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

On Select Command?

Status
Not open for further replies.

zzfive03

Programmer
Jun 11, 2001
267
Ok, I have a pulldown select box with some values that submit to a SQL statemnt on a different page. I would like it to automaticly &quot;execute&quot; once the selection is made (without the user haveing to click 'go') I think i need to call a &quot;onsubmit'document.run.submit()'&quot; or something. But also, my reciving page is currently using a If statment, to see if the 'go' button was clicked. (I do this because I have many pages pointed to this one and it just goes down the line of If statnemts until it finds the that matches. How can I set my button to a <> 0 as well as come to the page without pressing the 'ok' button? I hope I explained this clearly. Mark
 
Revise... Ok, I know how set the command in the <select> tag. It is:
************
onchange= 'document.run.submit()'
************

But, I would like to also have the onchange make a change to my varable 'selection'. I tryed it as follows:

*************
onchange= 'document.selection = 1; document.run.submit()'
*************
But it does not work, what am I doing wrong??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top