0

In my asp.net project i am using some javascript to open a popup window, its working fine,now let me come to my problem,i have a homepage when i click on login link it opens a popup window,in that popup window i have given register link, when i click register popup will close and registration page opens in seperate page, my problem is how can i open registartion page back in the homepage only.please help me, i hope my explanation regarding the problem is clear, please help me to overcome this problem

3 Answers 3

2
javascript:window.opener.location="some page"
Sign up to request clarification or add additional context in comments.

Comments

0

I'm not entirely sure you could, as (IIRC) you can't change the URL of another window using javascript. Some Javascript experts might be able to correct me though. - X2 has already beaten me to it! However my next point still stands:

Could you do it without a pop-up at all (because they're annoying and likely to get blocked anyway)? For example by using a hidden Div, that get's displayed as an overlay (like the famous light-box)? Then you're really still on your homepage all along.

Comments

0
function Reg() { window.close(); var strLocation = ""; var strProfileID = ""; if (top.opener == null){ strLocation = "NewAccount.aspx"; window.location = strLocation; } else{ strLocation = "http://" + top.opener.location.hostname+":"+ window.location.port + "/SendMail/" + "NewAccount.aspx"; top.opener.location = strLocation; top.opener.focus(); } }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.