473,395 Members | 1,639 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,395 software developers and data experts.

Javascript / popup window

I have a javascript function that is executed when a link button is clicked:

If Not (Page.IsClientScriptBlockRegistered("PopupWindow") ) Then
Page.RegisterClientScriptBlock("PopupWindow", Script)
End if

Script is a variable that is filled from calling a function that filles in
all the assigned variables
for the new window to open.

My problem is that I can't keep the window on top. It opens on top but when
my .aspx page finishes refreshing then the .aspx pages opens on top of my
pop up window. How can I keep my pop window on top.

I am not very knowledgeable with javascript and luckily got this function to
work after a lot of help on the newsgroups.

Is there a modal window I should use? I currently use window.open("link",
variables)

The window list instructions if the user needs them for an intranet
application.

Thanks
Nov 18 '05 #1
4 1441
use
ob=window.open(url)
ob.focus()

That will keep the popup on top.
Or you can use showModalDialog(url)

"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uA****************@TK2MSFTNGP09.phx.gbl...
I have a javascript function that is executed when a link button is clicked:
If Not (Page.IsClientScriptBlockRegistered("PopupWindow") ) Then
Page.RegisterClientScriptBlock("PopupWindow", Script)
End if

Script is a variable that is filled from calling a function that filles in
all the assigned variables
for the new window to open.

My problem is that I can't keep the window on top. It opens on top but when my .aspx page finishes refreshing then the .aspx pages opens on top of my
pop up window. How can I keep my pop window on top.

I am not very knowledgeable with javascript and luckily got this function to work after a lot of help on the newsgroups.

Is there a modal window I should use? I currently use window.open("link",
variables)

The window list instructions if the user needs them for an intranet
application.

Thanks

Nov 18 '05 #2
note that xp-sp2 which goes into wide release next week, will prevent this
code from running. i'd reengineer the page.
-- bruce (sqlwork.com)
"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uA****************@TK2MSFTNGP09.phx.gbl...
I have a javascript function that is executed when a link button is clicked:
If Not (Page.IsClientScriptBlockRegistered("PopupWindow") ) Then
Page.RegisterClientScriptBlock("PopupWindow", Script)
End if

Script is a variable that is filled from calling a function that filles in
all the assigned variables
for the new window to open.

My problem is that I can't keep the window on top. It opens on top but when my .aspx page finishes refreshing then the .aspx pages opens on top of my
pop up window. How can I keep my pop window on top.

I am not very knowledgeable with javascript and luckily got this function to work after a lot of help on the newsgroups.

Is there a modal window I should use? I currently use window.open("link",
variables)

The window list instructions if the user needs them for an intranet
application.

Thanks

Nov 18 '05 #3
Thanks for the tip. What exactly is the service pack going to prevent?
Javascript functions using windows.open?

Thanks
"bruce barker" <no***********@safeco.com> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl...
note that xp-sp2 which goes into wide release next week, will prevent this
code from running. i'd reengineer the page.
-- bruce (sqlwork.com)
"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uA****************@TK2MSFTNGP09.phx.gbl...
I have a javascript function that is executed when a link button is clicked:

If Not (Page.IsClientScriptBlockRegistered("PopupWindow") ) Then
Page.RegisterClientScriptBlock("PopupWindow", Script)
End if

Script is a variable that is filled from calling a function that filles in all the assigned variables
for the new window to open.

My problem is that I can't keep the window on top. It opens on top but

when
my .aspx page finishes refreshing then the .aspx pages opens on top of my pop up window. How can I keep my pop window on top.

I am not very knowledgeable with javascript and luckily got this function to
work after a lot of help on the newsgroups.

Is there a modal window I should use? I currently use

window.open("link", variables)

The window list instructions if the user needs them for an intranet
application.

Thanks


Nov 18 '05 #4
in the default setting, it prevents javascript from opening windows unless
its associated to a users click.

so,

<script>function doOpen() {window.open(url) } </script>
<input type="button" onclick="doOpen();" value="open window">

will open a windows while inline code like:

<script> window.open(url); </script>

will fail

-- bruce (sqlwork.com)

"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Thanks for the tip. What exactly is the service pack going to prevent?
Javascript functions using windows.open?

Thanks
"bruce barker" <no***********@safeco.com> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl...
note that xp-sp2 which goes into wide release next week, will prevent this
code from running. i'd reengineer the page.
-- bruce (sqlwork.com)
"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uA****************@TK2MSFTNGP09.phx.gbl...
I have a javascript function that is executed when a link button is clicked:

If Not (Page.IsClientScriptBlockRegistered("PopupWindow") ) Then
Page.RegisterClientScriptBlock("PopupWindow", Script)
End if

Script is a variable that is filled from calling a function that
filles in all the assigned variables
for the new window to open.

My problem is that I can't keep the window on top. It opens on top
but when
my .aspx page finishes refreshing then the .aspx pages opens on top of

my pop up window. How can I keep my pop window on top.

I am not very knowledgeable with javascript and luckily got this function
to
work after a lot of help on the newsgroups.

Is there a modal window I should use? I currently use

window.open("link", variables)

The window list instructions if the user needs them for an intranet
application.

Thanks



Nov 18 '05 #5

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

Similar topics

3
by: Arthur Connor | last post by:
Below you will find the first lines of my HTML page. Why doesn't popup a dialog window ? I click the Html page which is on my hard disc. A IE 5.5 browser window opens but not a dialog window...
2
by: Jeannie | last post by:
I have a popup window which is a slideshow of about 7 images. When the popup window loads, the first image is present and then the viewer can select next or previous to scroll through the rest of...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
9
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with...
6
by: szabelin | last post by:
Hello, I am trying to call a function inside the javascript block from asp.net during the postback (NOT button's OnClick event handler though). The javascript function creates new popup window. I...
12
by: Mark Fox | last post by:
Hello, I am attempting to do something very simple. I have a page MainPage.aspx and a popup window Popup.aspx. When users click on the linkbutton in the popup window I am looking to do some...
8
by: Terry | last post by:
I am loading a javascript function from my asp.net app. This function loads a string passed to it in a new window. I register the function to activate on click of an asp linkbutton. Now when...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
4
by: Matt Jensen | last post by:
Howdy all Hopefully I can explain my problem straightforwardly. In it's simplest explanation, what I want to do is have a hyperlink that, when clicked, executes some client side JavaScript and...
4
by: E | last post by:
I am having trouble with setTimeout working on a second call to the setTimeout function from a second page which is an html page. Here is the scenario. I have a web page and onload it calls a...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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...

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.