Click to See Complete Forum and Search --> : Openning a new window ON SUBMIT


neumy
07-25-2003, 04:37 PM
I have a submit button that I'd like to open a new window when pressed.

Here is my current SUBMIT button:
<a onClick="document.check.action='/locker/ppp/results_display.php?page=9print&part=2'; document.check.submit();" onmouseover="window.status='results_display.php?page=9print&part=2'; return true" onmouseout="window.status=''; return true">

True it's not a real submit button but a anchor made into one, but I'd like to somehow use a:
onclick="MM_openBrWindow('/locker/ppp/results_display.php?page=9print&part=2','','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=680,height=500')"

I'd very much like a positive responce ;)
Thanks for you help.

pyro
07-25-2003, 05:32 PM
I'm not sure I know what you are asking. To open a new window with a link, you use this:

<a href="http://www.w3c.org" onclick="window.open(this.href.'winname','width=600,height=400'); return false;">Open W3C</a>

neumy
07-25-2003, 06:09 PM
The trick that I'm trying to pull off is two-fold.

1) Use an anchor to act like a submit button. The reason I want this is to be able to have multiple buttons on my page, each one going to a different place but passing the same values from the form I'm using.

2) Opening a new window when I click the anchor. The reason I want this, is one of my many "submit" button redirects the user to a "print preview" page. This page needs the new values from the form BUT needs to operate in a seperate window.

I found that using: onClick="document.MYFORM.action='blah'" will cause the button to act as a submit button. This means that problem 1 is solved.

BUT, adding the common: MM_openBrWindow('url') doesn't work because I'm leaving the page via the form action.

My question is, How do I SUBMIT a form, cause one of multiple actions to process, and open the results in a new window?

I hope this is clearer! and I hope someone can answer me!

aoeguy
07-26-2003, 04:46 AM
I use:

onclick="window.open ('page', 'Site', 'personalbar=yes,toolbar=no,dependent=no,resizable=no,status=no,menubar=no,locationbar=no,width=450, height=230')"

Aoeguy