473,387 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Second Child window to open on top of Parent window

Hi,

I am using ASP.net 2012. (C# AS CODE BEHIND)

I have a parent window (ParentMain.aspx), I was able to open a new window (SampleChild1.aspx) from the parent window using below script on aspx.cs:
Expand|Select|Wrap|Line Numbers
  1. string strScript = string.Format("window.open('/Sample.UI/SampleChild1.aspx','window','toolbar=no,hotkeys=no,location=no,directories=no,menubar=no,scrollbars=yes,status=1,resizable=0,width=600,height=500');");
  2. ScriptManager.RegisterStartupScript(this, this.GetType(), "nothing", strScript, true); 
After the SampleChild1.aspx is opened, now I have two windows open
  1. ParentMain.aspx
  2. SampleChild1.aspx
Whenever I click the samplechild1.aspx link, it open up samplechild1 window. No issues.

I want the below flow to work.
From samplechild1.aspx, I have to open samplechild2.aspx from aspx page and this samplechild2.aspx should not open as a another new window or on top of samplechild1.aspx, it should open on the top of ParentMain.aspx page

Please tell how to set the samplechild1.aspx open on ParentMain.aspx.

Kindly provide a solution at the earliest.

Thanks,
UTD
Oct 18 '13 #1
1 1783
Frinavale
9,735 Expert Mod 8TB
This is actually a JavaScript question.
You can use the window.opener property to access the main window. From there you can call JavaScript functions and that can open the "child2" page within the main window.

I'm not sure, but you may lose access to your opener property once you change the page. I have moved your question to the JavaScript forum so that the experts there can give you more insight.

-Frinny
Oct 23 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ben Smeets | last post by:
Hi folks, Have been trying to figure out a solution for the following problem by reading lots of threads here, but doesn't work out. Hope someone can help me. I have a parent window which...
1
by: sathyanrockie | last post by:
Plase tell me what is the difference between window.open and window.showmodelessdialog. Can we use window.showmodelessdialog in place of window.open?
1
by: zEE | last post by:
How to close all the child windows when parent window get closed? in ASP.net application through scripting..
4
by: hashya | last post by:
Hi, I am trying to submit form in child window from parent window itself. However, not getting through it. e.g. Parent Window: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">...
1
by: kumuda v | last post by:
Hello all, I am new to web programming.I have an issue that has to done using javascript and php. How can I pass the data from child window to parent window. I have already written the...
5
by: BibhuAshish | last post by:
Hello, I have one child window. in child window i am selecting one radio button. i want to return that selected value to parent window. To open child window in parent window, i have written like...
3
by: Ravigandha | last post by:
Hi every one. I am developing a online movie tickets website. And im struck at this point. I have a link when on clicking the link a pop window opens where in that how to display all the check...
2
by: sindhureddy | last post by:
I need to pass parameters from child window to parent window.But they are in two different domains
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.