/    Sign up×
Community /Pin to ProfileBookmark

Form submit opens resized thank you window

Is it possible to submit a form and have a thank you page open up in another window withe a size of 400×400 and no url or status bars?

Also is it possible when the thank you window is launched the main form window either refreshes or redirects somewhere?

Thanks,
Aaron

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@zvoneMar 09.2008 — Is it possible to submit a form and have a thank you page open up in another window withe a size of 400x400 and no url or status bars?[/QUOTE]
yes, check window.open

use it in forms onSubmit event just remember to return value in that event like
[code=html]<form onSubmit="return openMyWindow();" ...>...</form>
<script type="text/javascript">
function openMyWindow(){
window.open(...);
return true;
}
</script>[/code]

IAlso is it possible when the thank you window is launched the main form window either refreshes or redirects somewhere?[/QUOTE]
that also. check window.opener
Copy linkTweet thisAlerts:
@HDCauthorMar 09.2008 — Thanks ZVone, how do I set the actual thankyou.html page and the attributes like size of the new window?
Copy linkTweet thisAlerts:
@zvoneMar 09.2008 — you got it all on the link i provided. for you it would go:

window.open('thankyou.html','Thank you','width=400,height=400,resizable=no,scrollbars=no,menubar=no,toolbar=no,location=no')
×

Success!

Help @HDC 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...