Forum Moderators: open

Message Too Old, No Replies

2 submits 2 locations same form

         

fintan

1:26 pm on Apr 18, 2006 (gmt 0)

10+ Year Member



Hi I'm trying to have 2 submit buttons in one form one going to a.html and the other to b.html.

Can you add the link to this?

document.forms[0].submit();

Something like

document.forms[0].submit('a.html');

Thanks in advance

fintan

da644

9:51 pm on Apr 18, 2006 (gmt 0)

10+ Year Member



Try using the onClick event on the button to call a function to change the 'action' of the form. Off the top of my head I can't think of the JS you need to change the action, but something like:

form.action="a.html"

will be along the right lines, do a search on Google and you will find it.

Andrew.

[edited by: Woz at 11:38 pm (utc) on April 18, 2006]
[edit reason] No SIGs please, see TOS#13 [/edit]