473,612 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Second Child window to open on top of Parent window

1 New Member
Hi,

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

I have a parent window (ParentMain.asp x), I was able to open a new window (SampleChild1.a spx) 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.as px is opened, now I have two windows open
  1. ParentMain.aspx
  2. SampleChild1.as px
Whenever I click the samplechild1.as px link, it open up samplechild1 window. No issues.

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

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

Kindly provide a solution at the earliest.

Thanks,
UTD
Oct 18 '13 #1
1 1788
Frinavale
9,735 Recognized Expert Moderator Expert
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
27585
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 opens a popup window (child). What i would like to do, is to be abke to keep surfing to other pages in the parent and after (lets say) a couple of new pages, still be able to say "child.setFocus()";
1
6836
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
2374
by: zEE | last post by:
How to close all the child windows when parent window get closed? in ASP.net application through scripting..
4
6402
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"> <HTML> <HEAD>
1
1680
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 code to fetch the data from mysql database and and display it in the child window in the form of table. And when user selects the particular name. the same name should get transfered to parent window. How do I do this. Please help me out. With...
5
28622
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 this: window.open() In child window to return a value i have written like this child window: javascript function
3
2488
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 boxes. When selected the check boxes and close the window the parent window have to display the selected values result without refreshing ! Any suggestion is very much needful to me !
2
1861
by: sindhureddy | last post by:
I need to pass parameters from child window to parent window.But they are in two different domains
0
8115
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8617
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8254
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6082
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5537
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2555
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1416
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.