HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 8th, 1999, 05:54 PM
yashika
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
The code for selection box is:
<select name="select" size=1 >
<option value="0" selected><b>CATEGORIES</b></option>

<option value="">USERS</option>
<option value="">ROOMS</option>
....
</select>
I would like to know that when the USER option is selected from the selection box, how do i call a javascript function eg: userframe().
I have certain commands in the function userframe() to execute after the selection is made from the box.

Thanks

Yashika

Reply With Quote
  #2  
Old December 21st, 1999, 11:45 PM
sgromoll
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hi,

If i understand correctly, you want to have a function called whenever the user clicks on a particular option?

You can do this by writing an OnChange handler, and then checking which option is selected. Something kind of like:

<SELECT name="mybox" Size=10 OnChange="CheckClick()";>
...

and then the handler:

function CheckClick()
{
// where 3 is the index of your USER option
if(document.UserForm.mybox.options[3].selected)
[do something, like call UserFunction()]
else
[return, or do something else]

}

-stef

[This message has been edited by sgromoll (edited 12-21-99).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > CODE FOR SELECTION


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway