Form/Javascript Question

Results 1 to 2 of 2

Thread: Form/Javascript Question

  1. #1
    Join Date
    Dec 1969

    Default Form/Javascript Question

    Hello,<BR><BR> I saw this the other day but cannot seem to find it again. I have a form that I would like to have the option to post to different places. EX: someone fills out the form, if they want to search they press the search button, if they want to save it they press the save button. <BR><BR> I believe it would be best to use javascript so I am checking here. Any information would be greatly appreciated.<BR><BR>Thank you

  2. #2
    Join Date
    Dec 1969

    Default RE: Form/Javascript Question

    This is how I do it...<BR><BR>Have the "Save" Button set to submit so it will submit to the action set in the form tag.<BR>In the Search button tag have an onClick event that calls a function. Similar to what you would do to validate a form...but instead the function changes the form action.<BR><BR>function search_instead() {<BR>document.form1.action = "theotherpage.htm";<BR>document.form1.submit;<BR>} <BR><BR>The button tag would be something like<BR><BR>&#060;input type="button" name="search" onClick="search_instead()"&#062;

Posting Permissions

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