Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Trouble with popup windows

 
Thread Tools Search this Thread
Old 12-06-2004, 05:27 PM   #1
Default 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.


=?Utf-8?B?Y2xzbWl0aDY2?=
  Reply With Quote
Old 12-06-2004, 05:38 PM   #2
bruce barker
 
Posts: n/a
Default Re: Trouble with popup windows
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" <> wrote in message
news:BAA27463-924B-481C-9971-...
| 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.




bruce barker
  Reply With Quote
Old 12-06-2004, 06:31 PM   #3
=?Utf-8?B?Y2xzbWl0aDY2?=
 
Posts: n/a
Default Re: Trouble with popup windows
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" <> wrote in message
> news:BAA27463-924B-481C-9971-...
> | 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.
>
>
>



=?Utf-8?B?Y2xzbWl0aDY2?=
  Reply With Quote
Old 03-23-2005, 05:31 PM   #4
=?Utf-8?B?Q0FD?=
 
Posts: n/a
Default Re: Trouble with popup windows
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" <> wrote in message
> > news:BAA27463-924B-481C-9971-...
> > | 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.
> >
> >
> >



=?Utf-8?B?Q0FD?=
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Reset / Recover Forgotten Windows NT / 2000 / XP / 2003 Administrator Password wskaihd Software 2 11-17-2009 02:01 AM
How to activate Remote Assistance with XP using Windows Live Messenger Oziisr General Help Related Topics 0 02-01-2008 04:45 PM
Computer Security aldrich.chappel.com.use@gmail.com A+ Certification 0 11-27-2007 02:11 AM
MCITP: Enterprise Support Technician MileHighWelch MCITP 1 06-19-2007 10:25 PM
Re: Question about MS critical updates John Coode A+ Certification 0 06-30-2004 06:08 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46