473,785 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open a new window on top of parent window using script

Using .NET 1.1, vb code behind.
I have a project and I have been opening new windows throughout it. I
need them opened on top of the parent, and be able to minimize or go
back to the parent if needed before closing the new window. I am
opening the window this way.
Response.Write( "<script>window .open('ReviewCo mments.aspx')</script>")

On the code behind of the new window in the Page_Load function, I keep
the window on top by using this.
RegisterStartup Script("OpenOnT op", "<script
language=javasc ript>document.f ocus();</script>")

This has worked great for about 5 other windows. I have went back and
added another window, but it doesn't work everytime. I can sit here
and test it over and over, and sometimes it stays on top but most of
the time it goes to the back. I have checked the properties of the
page against the ones that work and they are identical. Any ideas what
is happening?
I am open to other ways of getting the window to stay on top, so
suggestions are appreciated.
Thx

Nov 15 '06 #1
2 3195
most likey, the other windw is setting focus. you should stop using popups
as most browsrs will block them. use a floating iframe instead. a good
javscript book will tell you how, so get a control.

-- bruce (sqlwork.com)

"Ralf" <ma************ @intergraph.com wrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
Using .NET 1.1, vb code behind.
I have a project and I have been opening new windows throughout it. I
need them opened on top of the parent, and be able to minimize or go
back to the parent if needed before closing the new window. I am
opening the window this way.
Response.Write( "<script>window .open('ReviewCo mments.aspx')</script>")

On the code behind of the new window in the Page_Load function, I keep
the window on top by using this.
RegisterStartup Script("OpenOnT op", "<script
language=javasc ript>document.f ocus();</script>")

This has worked great for about 5 other windows. I have went back and
added another window, but it doesn't work everytime. I can sit here
and test it over and over, and sometimes it stays on top but most of
the time it goes to the back. I have checked the properties of the
page against the ones that work and they are identical. Any ideas what
is happening?
I am open to other ways of getting the window to stay on top, so
suggestions are appreciated.
Thx

Nov 15 '06 #2
On the one parent page, I have a datagrid that has 2 buttons. Each
button opens a seperate window. The one button works great everytime,
this button works about 1 out of 10 times. I don't think the parent is
gaining focus b/c it would be doing so with the other window.

Nov 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3382
by: google | last post by:
Hi there, I've searched high and low for this, but it seems most people are looking to establish (and control) the relationship between a parent browser window and it's associated child window created with window.open. I would like to break this connection. Why? Because there is an application that I want to open in a new window, but no matter what I do it will close the window and redirect the original (parent) window to its location...
3
3808
by: Bob | last post by:
I am trying to create a popup page (to act as a menu) from a parent page. When the parent page (index.jsp) calls my popup function (see below) it will properly open the correct size browser window only if the browser that index.jsp is opened in is NOT maximized. If index.jsp is maximized and then I click on the test link that fires off the openMain function, the browser that is opened for the popup is also maximized. function...
2
2614
by: yatharth | last post by:
I am facing a problem ,the situation is like this. I have a home page named "Index.html" ,on which there is login link,when i click on the login link the login popup opens and user enter the login information in it. Now when the user click the submit button then new popup window
3
4067
by: Aaron | last post by:
I am having a little difficulty with a relatively simple task. I have a parent webform. I have a javascript attribute added to a button to open a new window when clicked. The user fills in a textbox then clicks the button and on page load the child window should grab that val run a query an present the results. Given that I am bouncing between server side controls and client script. I am just having a little trouble passing my textbox...
6
34288
by: Jack | last post by:
I have a main webpage that has a list of records, each with a link to a window.open function call. As an example, a page that opens is editrecord.aspx?RecordID=34, and another is editrecord.aspx?RecordID=52. If the user starts changing the contents of the opened window, and then leaves it open and goes back to the main page, refreshes the list, and clicks on the same record link again, it reloads the contents of the page the user had...
2
9868
by: sanscrimson | last post by:
Hi! I just want to ask if it possible to call functions in parent window if the child window is created. Below is sample: //--------------------------------------------------------------------------------// <html> <head> <title></title> <script language="JavaScript"> var win;
1
2473
by: Socrates | last post by:
Hi - Have tried for half and hour to get this script to work: I am trying to close the parent window while opening a centred new child window I would be grateful if someone could correct the script below which does open a new window, but not in a centred position. Here is the link to the url:
1
4500
by: Ramachand | last post by:
Actually I have to call a dialog window "Dwin1" from a Parent Window. From Dwin1, I have to call another Dialog Window "Dwin2".if user close the Dialog Window "Dwin2", i have to refersh the Dwin1. If user close Dwin1, i have to refresh the Parent Window. For opening a Dwin1 , should not be a problem.but if i open the another dialog Dwin2 from Dwin1, it's opening like a seperate window Dwin1 . From there it's opening the Dialog Open Dwin1...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
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,...
1
10096
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,...
1
7504
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
6742
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();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
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
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
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.