Jump to content

Submitting A Form To More Than One Location


ShadowMage

Recommended Posts

Hi,I've done some searching but I can't seem to find what I'm looking for. Can anyone tell me if it's possible to submit an html form to more than one location.For example, in an onchange event I want to submit the form to itself, but when I click a save button I want the form to submit to a different page.Please help,Thanks!jkloth

Link to comment
Share on other sites

Just thought I'd post back to report that I've found the solution. I overlooked it on the W3Schools website.You can change the form's action attribute before you submit the form. This was the example posted in the reference:

<script type="text/javascript">function changeAction()  {  var x=document.getElementById("myForm")  alert("Original action: " + x.action)  x.action="default.asp"  alert("New action: " + x.action)  x.submit()  }</script>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...