Reference to another instance of page from a page (URGENT!!!)

O

Oney

I have 3 pages, x.aspx,y.aspx,z.aspx
x.aspx opens y.aspx as popup then y.aspx opens z.aspx and closes
itself. when z.aspx is opened x.aspx page must be redirect another
page. So In my opinion, I must refence to x.aspx from z.aspx to
redirect another page. how can I do that. I waste too much time. Pls
help!
 
?

=?ISO-8859-1?Q?Anders_Nor=E5s?=

Oney said:
I have 3 pages, x.aspx,y.aspx,z.aspx
x.aspx opens y.aspx as popup then y.aspx opens z.aspx and closes
itself. when z.aspx is opened x.aspx page must be redirect another
page. So In my opinion, I must refence to x.aspx from z.aspx to
redirect another page.

You can do this with client side scripting. To redirect the original
browser window to another url from the pop up window when "z.aspx" is
loaded you can add the following JavaScript code to "z.aspx":

onload=function() {
if (window.opener) {
window.opener.location.replace("abc.aspx"); // Replace abc.aspx
with your real URL.
} else alert("z.aspx was not opened as a pop up!");
}

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
 
G

Guest

JavaScript is your best shot in your scenario. Via JavaScript, you can
control window instances or frame instances and force redirection to another
page.

In other scenarios, you can reference a page class from another page, but it
is better to refactor to a business class in these instances than use Page
objects as objects to feed other pages.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top