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

Trouble with popup windows

I am building an ASP.NET application where I have been required to make all
the editing screens popup windows within the application. I didn't have any
trouble creating the new windows but only about half of them show on top of
the main application when they are created. The window are created in
javascript and I've tried using the top property of the window object but it
still does not work for all my windows and all the windows are created using
the same command. Am I missing something in javascript or is this an issue
with the new Internet Explorer?

This is the code I used to create my popup windows:

'Create a script to bring up the update window
strScript = "<script language='javascript'>"
strScript &=
"window.open('frmServiceLogUpdate.aspx?mode=update &servicelogid=" &
CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
"','AddLog','width=522,height=450,top=100,left=200 ,directories=no,location=no,menubar=no,scrollbars= no,status=no,toolbar=no,resizable=no');window.top( 0);"
strScript &= "</script>"

'Execute the script
RegisterClientScriptBlock("NewEntry", strScript)

Any help would be greatly appreciated.
Nov 19 '05 #1
3 1614
couple of issues.

1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.

-- bruce (sql;work.com).

"clsmith66" <cl*******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update &servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
"','AddLog','width=522,height=450,top=100,left=200 ,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.
Nov 19 '05 #2
Thank you for your quick response but I am still having some difficulties.
In response to your sugesstions I already had the popup blocker turned off,
the popup windows are only created when a user clicks a button and are closed
after use, and the window can not be resized. I tried using the focus method
on the window but still with no luck. For example on one page a user can
open a window to add a new entry to a table or they can open a window to edit
an existing entry. If I click the button to edit the entry, no problems the
window opens on top of the application. If I click the button to add an
entry, the new window opens but it is created underneath the application.
Both windows open the same asp.net page and the only difference in the code
are the parameters each one passs. I am very confused.

Chris

"bruce barker" wrote:
couple of issues.

1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.

-- bruce (sql;work.com).

"clsmith66" <cl*******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update &servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
"','AddLog','width=522,height=450,top=100,left=200 ,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.

Nov 19 '05 #3
CAC
Just curious.. Is smartnav enabled in your web.config? I have noticed this
problem when smartnav is enabled.

"clsmith66" wrote:
Thank you for your quick response but I am still having some difficulties.
In response to your sugesstions I already had the popup blocker turned off,
the popup windows are only created when a user clicks a button and are closed
after use, and the window can not be resized. I tried using the focus method
on the window but still with no luck. For example on one page a user can
open a window to add a new entry to a table or they can open a window to edit
an existing entry. If I click the button to edit the entry, no problems the
window opens on top of the application. If I click the button to add an
entry, the new window opens but it is created underneath the application.
Both windows open the same asp.net page and the only difference in the code
are the parameters each one passs. I am very confused.

Chris

"bruce barker" wrote:
couple of issues.

1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.

-- bruce (sql;work.com).

"clsmith66" <cl*******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update &servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
"','AddLog','width=522,height=450,top=100,left=200 ,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.

Nov 19 '05 #4

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

Similar topics

6
by: Mica Cooper | last post by:
Hi, I have a series of Select menus on a page. I am trying to allow the user to click on the Select title and have it popup a help window. This works fine with the following code except that all...
5
by: Willem van Isselmuden | last post by:
Hello, I've a problem I hava a page with different popup windows, when I hit a link the first one pops up and with the first open i would like to hit the second link in the parent page so the...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
3
by: Dan | last post by:
First, I'm sorry if this question has been asked too many times. I'm new to this news group. The question has to do with the use of popup windows in a web page. I have heard that popup windows...
2
by: Kevin Lam | last post by:
Hi all, I am writing an application which requires using a popup windows to edit the detail of a record. The popup windows is created by it's parent which shows the detail of the record,...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
9
by: Jimmy Junatas | last post by:
When we open a window (using client-side jscript ie. window.open("/Site/Popup.aspx?...",...)) from Page1.aspx, the called page Popup.aspx does not have access to the Session variables present in...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
11
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.