/    Sign up×
Community /Pin to ProfileBookmark

How do I open Redirecting page in a NEW window

On a submission of form, my redirecting page opens in the same window. How can I make it open in a new window?

[code=php]newSite = “ThankYou.html”;[/code]

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@Kyleva2204Mar 02.2008 — Not sure how this is for PHP, but in your <form> tag.. put in TARGET = "_BLANK".. like [code=html]<form target="_blank">[/code]

I think thats what you want..
Copy linkTweet thisAlerts:
@NogDogMar 02.2008 — Better yet, don't mess with my browser by opening up unrequested new windows (which is why the "target" attribute has been deprecated in strict doctypes).

A better solution might be to do some clever things with JavaScript and CSS styling to give the illusion of a separate window with the "success" message in it.
Copy linkTweet thisAlerts:
@jamesx521authorMar 02.2008 — I normally redirect to a Thank You page which is [B]_self[/B], so I don't even bother with changing the current PHP submission code I have, because it opens in the same window. However, in this case, I have a Flash Audio player that plays music without interruption, so the Thank You (for your submission) page has to open in a new window... or, it interrupts the song if it opens in the same window.
Copy linkTweet thisAlerts:
@gizmoMar 03.2008 — OMG, that's even worse than a new window :rolleyes: ?
Copy linkTweet thisAlerts:
@jamesx521authorMar 04.2008 — What are you implying [I]gizmo[/I]? When you order online isn't it normally [B]_self[/B]?
Copy linkTweet thisAlerts:
@Kyleva2204Mar 04.2008 — I have just compiled a simple page using AJAX and returning a LightBox with a simple "Thank You" message. I have enclosed the ZIP with this post. I used the Prototype Framework and script.aculo.us, I have included the required Javascript files also in the zip. It should work out of the box for you, just customize it for your needs. I have also included in-depth comments to help you out if you need it.

Hope this helps ?... and I hope im not breaking any more standards with this... lol

[upl-file uuid=e6558e28-f933-4fca-9614-118a6f70ed41 size=41kB]new_window_form.zip[/upl-file]
Copy linkTweet thisAlerts:
@gizmoMar 04.2008 — Just my personal preference, but I don't like flash (too gimmicky), nor someone else's choice of music.
Copy linkTweet thisAlerts:
@jamesx521authorMar 07.2008 — Just my personal preference, but I don't like flash (too gimmicky), nor someone else's choice of music.[/QUOTE]If you are asked to put an audio player on a website, where people would be able to select and play different songs... what else are you going to do?
Copy linkTweet thisAlerts:
@jamesx521authorMar 07.2008 — [I]Kyleva2204[/I], thanks for the files... but I think they're a bit too complex for me.
×

Success!

Help @jamesx521 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,
)...