views:

23

answers:

2

We send out a confirmation email on completed registration. User need to click a link to confirm the registration, this link opens up a new window. Bog standard procedure...

How can I get the new window to open up in the existing window (or close the old window)?

[Update, not sure if I was clear enough.]
When I click on the confirmation link I want it to open or replace the window I still have open from the registration process.

A: 

Use the target="_top" attribute, i.e.

         <a href="destinationurl" target="_top">linktext</a> 

That will solve your problem

Rupeshit
Not sure if I do something wrong or if its just not working... When opening the email in my email application the link opens in a new browser window, not the one I already have open during the registration process.
A: 

You can't control the user's email client (and this is a good thing), so you cannot direct how it opens links.

You could use a script on the "old" page (the one used to enter email address, profile details, etc.) to poll your server and do something once registration is confirmed. If the user closes this page before that happens, e.g. opens another link on the site, this works well by not moving them where they don't expect.

The user would still have the registration page open, so simply put instructions on that along the lines of "email address confirmed, would you like to now 1) do this, 2) that, or 3) something else" (all links).

Roger Pate
Thanks Roger. I did some research and I believe your spot on. Its no real solution to my question, assume I should still tick it off... Thanks for you help, much appreciated
@user: Sometimes "you can't do that" is the only possible answer. :( Glad to help; hopefully my suggestions can help you create a good user experience.
Roger Pate