form redirection

J

Jack

Hi,

I have a web form (page1.aspx) with a hyperlink on it that opens a new
browser (page2.aspx) using window.open. When page2.aspx opens I want
to redirect the page1.aspx in the backgroud. I tried using
response.redirect in the page_unload method but this didn't work.

Any ideas?

Cheers,
Jack
 
K

Karl Seguin

Jack:
Page_unload has already fired ...it's a serve side event....the easiet way
to do it is using javascript.


in page 2, use:

<script language="javascript">
window.opener.location.url="SOME URL";
</script>

Karl
 
P

Pradeep Sabharwal

Hi,

You can do this in Javascript on onload or onunload event of document
i.e. in <Body> element.
<body onload="javascript: RefParent();">
<script language="javascript">
function RefParent()
{ self.opener.document.location= 'page2.aspx'; }
</script>

Hope This works

Pradeep
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top