Thanks mplungian, could you tell me how I can set a flag. emmmmmmmbarrrrrasssed, sounds basic stuff !
james
Main Topics
Browse All TopicsHi, I want to make sure that user names entered into a database are not duplicated. My approach has been
- Create the registration form
- Test on the registration action page if the entered user name is already in the database
- If so, I get kicked back to the registration form (using a jave autoback code)
This works.
HOWEVER - I need to alert the user that he has been kicked back to the registration form because the user name entered is already taken. My thought is to have a popup alert generated by the actioin page. So the action page needs to
1) <----- test----->
2) redirect back to form (using javascript -1 trick )
AND
3) generate an alert popup which shows itself on top of the registration form to which he has been redirected.
Thats my main problem.
Another concern I have is that I am using javscript and pop up windows. Whats the probability that a user will not have javascript enabled or have pop ups blocked ???? An all coldfusion solution would be prefereable maybe ??
MANY THANKS
james
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here is my approach:
1. After you submitted your registration page to the process page (let say process.cfm)
2. In your process.cfm, check if username is duplicated:
if yes,
a. save all the submitted data into session variable
b. add an extra flag (as what mplungian suggested) into session, so that we can use and compare it on registration page.
c. redirect the process page to registration page again.
3. Amend existing script in your registration page, so that it compare if extra flag indicates a duplicate username or not. if it's duplicate, pre-fill the fields with session variables, and highlight the username to indicate it's duplicated.
if no,
a. clear any existing session variables that handle the registration page.
b. redirect to thank you page.
hope this helps
Thanks ryancys,
my problem is I just dont understand this FLAG business. From what you say, it overcomes the problem of the registration form page : SO
first time around the FLAG does not exist on the registration page, or its zero and user enters data
after the process.cfm runs, a flag is set or not set depending on test for duplication of user name
on referral back to the registration page, the page runs and now sees the flag and the error message is generated and the fields are repopulated with the sesssion data saved when the process page ran.
Makes sense to me, but could could you give me help on how I create this session varialbe with all the filed information and the flag as well ??
Thanks very much for taking the time to help me
james
I don't have Coldfusion server installed either in office or on home's laptop, probably I can't provide you a runable-tested sample scripts here... that's how far the concept I can advise to you.
The links provided by mplungjan explains on how to use sessions in coldfusion scripting, I hope that helps you too.
Business Accounts
Answer for Membership
by: mplungjanPosted on 2007-11-06 at 00:05:49ID: 20222051
Yes a coldfusion solution would be preferable - just set a flag which will result in a red message displayed on the page.
Much less intrusive
A javascript COULD react to the presence of that flag too if you really want an alert
Michel