Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Drop Down Select Box OnSelect
Old 01-27-2007, 05:09 PM Drop Down Select Box OnSelect
Mattmaul1992's Avatar
Ultra Talker

Posts: 486
Name: Matt
Trades: -1
Hi,

I have recently started a project at http://www.mmmsoftware.org/projects/php/2/index.php which is just a simple ticket request form system. What I need is under payment method whenever the user selects a field in the drop down box, such as Paypal right to the right or under that box a text form field will appear with Paypal E-mail. Or if they choose WebMoney, then WebMoney ID appears underneath the drop down select box.
Although JavaScript is definitely not my best language I do know that I will have to use the OnSelect function, but I don't know where to take it from there. A link to somewhere that could either teach me how to do this, or a script itself would be appreciated very much.
Thanks
__________________
PHP Code:
$talkupation++; 

Please login or register to view this content. Registration is FREE
- Free IPB forum hosting (releasing today!!!), no ads, free modifications

Last edited by Mattmaul1992; 01-27-2007 at 05:10 PM..
Mattmaul1992 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-27-2007, 07:20 PM Re: Drop Down Select Box OnSelect
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Actually, what you want is the onchange handler, not onselect.

The difference between the two is that onchange will fire every time the selection changes, whereas onselect is meant for when a user selects a section of text from a text or textarea field.

<select name="your_field" onchange="your_function()">

That's what you want.

The problem is that you're not going to find anything that would show you how your specific example works. You're just going to have to dig around, find something similar, and retrofit.

http://gwydir.demon.co.uk/jo/javascript/html.htm <--- this would help somewhat since it demonstrates the concept with keystrokes. But that's as close as you're gonna get.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 01-27-2007, 08:05 PM Re: Drop Down Select Box OnSelect
Mattmaul1992's Avatar
Ultra Talker

Posts: 486
Name: Matt
Trades: -1
Thanks a lot,
I'm pretty sure I can figure it out from here.
__________________
PHP Code:
$talkupation++; 

Please login or register to view this content. Registration is FREE
- Free IPB forum hosting (releasing today!!!), no ads, free modifications
Mattmaul1992 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Drop Down Select Box OnSelect
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37901 seconds with 12 queries