Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dropdown onChange function call on Page load

Status
Not open for further replies.

NMenon

MIS
Mar 1, 2005
1
US
I have a drop down list with items (say, 10 in number) being populated from the database. onChange of dropdown calls a function f(x).
My problem is that when the page loads I want the 7th item to show as selected item in the drop down. Until here it's fine. However, I want f(x) to also fire as soon as the 7th item is selected. Any help is appreciated since I am not too familiar with asp development.
Thanks
Naveen
 
Do you have any relevant code to show?

Assuming that you always want the seventh item to show initially, you can set that item as the selected item in a page onload event (client-side). You can also set the onchange event of the drop down box to call the f(x) function. Or, if you need it to execute the f(x) function even if there is no change, perhaps the onselect event would do it. (I'm not completely certain about that, you can check with forum216 for additional help if need be in that particular instance).

------------------------------------------------------------------------------------------------------------------------
If you don't have a sense of humor, you probably don't have any sense at all.
- Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top