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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset a select box

Status
Not open for further replies.

zzfive03

Programmer
Jun 11, 2001
267
Good morning;
Lets say I have 2-3 select boxes on the same page, what can I do so that when I click one, it resets the others?

THe idea is they are on a side frame and they redirect the MAIN frame to go to a different page. The problme is that once the page redirects, my SIDE pulldowns stay the same. I need some way to reset them, ether when the user clicks the select box, or on the MAIN page doing an ONLOAD or somehting

any ideas??

Thanks
 
Hello zzfive03,

With javascript and without frames here is a set of pages that show how to set up dynamic navigation.


For your requirement the navigation frame must be recreated when the main frame is filled with a new page. With ASP, the procedure would be to load the new page in the main frame, then call the navigation script with a session variable or querystring or hidden form element to identify the new navigation needed. In the navigation script branch to the appropriate code to build the navigation using Response.Write("HTML code for navigation corresponding to main page");
 
You could use an onChange event on all of the selects so that when you make a selection in one the others get reset

function clear(){
document.formname.selectname.value="";
}

I think something like this should work for you.

Roj
 
I ended up doing a JS OnLoad on my target pages that went to the parent.side frame and did a Reload() to just refresh the page. This way I am guarenteed that all the pulldowns are started over. This appears to be working.

Thanks for your advice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top