a javascript question

Results 1 to 3 of 3

Thread: a javascript question

  1. #1
    Join Date
    Dec 1969

    Default a javascript question

    I was hoping that one of you out there could help me on this. I&#039;ve looked thru javascript source and other sites but to no avail. My javascript is not too good to say the least. Anyway, here is my problem. I have a combobox in a form and I want the form action to correspond to the value chosen from the combo box. My current (and flawed!) code is below. All help is appreciated!<BR><BR>this is the function:<BR><BR>&#060;script language="javascript"&#062; <BR>function submitthis(){<BR>submitthis = cboVisit<BR>} <BR>&#060;/script&#062;<BR><BR>and this is the form tag:<BR><BR>&#060;form NAME="clientsearch" action = submitthis() method="post"&#062;

  2. #2
    Evel Knievel Guest

    Default RE: a javascript question

    Maybe you could do this by setting up an onChange event for the listbox which defines the action of the form. Eg<BR><BR>&#060;select name="cboVisit" onChange="document.clientsearch.action = document.clientsearch.cboVisit.value"&#062;<BR><BR >You would have to set up a default action for the form if the user did not make a selection.

  3. #3
    Join Date
    Dec 1969

    Default Works like a dream! Thanks! <eop>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts