Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / January 2005



Tip: Looking for answers? Try searching our database.

Changing the value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EdmondsM - 28 Jan 2005 23:08 GMT
Hi all, I have created a drop down box that contains usersnames.  Is there a easy way to populate a hidden email address field based on the username selected by the user.

Thanks in advance
BSterner - 29 Jan 2005 00:21 GMT
You can either call a javascript function in your select field's 'onChange'
event, which would set the value of your email field or submit the page to
itself and read the value of the username form field using the 'URL' or 'FORM'
structure based on your form method 'GET' or 'POST'
EdmondsM - 31 Jan 2005 22:37 GMT
BSterner,  How would I go about making the page call itself upon selecting the
check boxes??  So, based on the username they select I can populate a hidden
field with the email address.  Is this easily done with more than one dropdown
box.  thanks
Mr Black - 30 Jan 2005 21:37 GMT
You could simply keep email address together with the user name:

<select name="users">
   <option value="user1,user1@domain.net">user1
   <option value="user2,user2@server.com">user2
</select>

Split user name and email address on the calling page.
EdmondsM - 31 Jan 2005 00:38 GMT
Thanks for the response Mr. Black, So call the username and email address at
the same time within the option tag.    Could I call the email address in a
hidden field??  I will give that a shot.  Thanks again.
EdmondsM - 31 Jan 2005 21:31 GMT
Mr. Black, this is not working.  I am trying to call the username and email
address from a table to populate the dropdown box.  The box gets populated
fine. I just can't get the calling page to see the email address.
Mr Black - 31 Jan 2005 22:59 GMT
<cfset user=ListGetAt(users, 1)>
<cfset email=ListGetAt(users, 2)>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.