Page 1 of 1

button like submit

Posted: Thu May 19, 2005 9:58 am
by shiznatix
i have a form where when they click on a button a window opens but when i make that button a submit button it changes the page on on and opens the window but when i just make it a button it only opens the window but dosnt process any of the data in the form. how do i go about fixing that?

Posted: Thu May 19, 2005 10:10 am
by onion2k
I think you'll need to use some Javascript. Something like:

Code: Select all

onClick=&quote;window.open(); document.form.submit();&quote;
But obviously with working JS code..

Posted: Thu May 19, 2005 10:16 am
by shiznatix
ok well that kinda worked but how do i submit the data to the newly opened window instead of to the page its currently on?

o and document.form.submit() gives me a error but this.form.submit() does not

Posted: Thu May 19, 2005 10:37 am
by shiznatix
never mind i found out that you can do
<form action="page.php" target="new">
and it auto opens the new page submiting the data when you hit the submit button