/    Sign up×
Community /Pin to ProfileBookmark

Openning a new window ON SUBMIT

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.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@pyroJul 25.2003 — 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>
Copy linkTweet thisAlerts:
@neumyauthorJul 25.2003 — 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!
Copy linkTweet thisAlerts:
@aoeguyJul 26.2003 — 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
×

Success!

Help @neumy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...