Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: select box to clear other field


Message #1 by "steve peterson" <stephen.peterson@m...> on Thu, 26 Jul 2001 15:13:02
hi, 
i'm a rookie with no time to learn. i'm trying  to figure out how to make 
a form (name="QBE_QUERY") that serves two purposes. the first is to submit 
a simple keyword from a text field(name="QI0") , the second is to send a 
value from a select box (name="QI6"). 
the form is laid out so that each choice has its own submit button.

i need the select box to clear the text field when selected. I would also 
like the text field's submit to  clear the select's value. the default 
value for both is "".

i know i need a javascript for it to happen but have been unable to figure 
it out.
i've been trying to add an onFocus or onSelect to the input tag with 
something to change one other field in the form. i think i may need a 
funcion but that is over my head.

any (easy) solutions would be greatly appreciated.

thanks
steve

  Return to Index