faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 18 people (39%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How do I submit a single form to two different cgi-scripts using javascript?

Aug 30th, 2004 23:31
Sunil M, Mattias Westberg,


You just need to give different actions before submitting the form.
function submitForm(){
   document.formName.action="targeturl";
   document.formName.submit();
}
You can write separate functions for each button or you can use ur own 
logic to change the url. hope this will help anyone.