Link to home
Start Free TrialLog in
Avatar of starbase2
starbase2

asked on

Have one form with two different submit destinations

Hello,

I have a standard form on a asp page and I need to have the option to send it to an alternate destination page. How can I do this? I've tried with a button that opens a new window but I don't know how to capture the different form values and send it to this new opened window.

Can anyone help me with this?

Thanks a lot and kind regards.

Oscar
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of starbase2
starbase2

ASKER

That's great. Is there anywat to open it on a new window? I know that adding target="blank" on my original form it opens on a new windows but is there a way to do it with this alternate one?

Thanks a lot.
sure, just change the function to:

<script language="javascript">
    function submitData() {
         document.frmName.action = 'somePage.asp';
         document.target = 'blank';
         document.submit();
    }
</script>

Open in new window