Ask a Question related to ASP.NET General, Design and Development.
-
jayuya #1
closing showModalDialog window from server side
I have a simple page that I will like to display while i
am processing the user request in the server. The page
only has a label saying "Please Wait..."
My objective is to show this window while the code
executes in the server but I can not close it after i am
done... below is a sample code....
thanks in advance...
jayuya
js = "<script language=javascript>window.showModalDialog
('StatusDisplay.aspx','','dialogWidth=475px;dialog Height=1
25px;status:no;help:no');</script>"
'displays window
RegisterStartupScript("StatusStartPage", js)
'run code
While minCounter <= maxCounter
////code to update records .....
/////code
minCounter = minCounter + 1 'looping to next power
End While
js = "<script language=javascript>window.close
();</script>"
'closes window
RegisterStartupScript("StatusEndPage", js)
jayuya Guest
-
window not closing
Hi, I'm using window.close() command in a pop box (YesNo.aspx) embedded in a ASP button clcik command. Its a pop up confirmation for Yes or No. If... -
Self Closing Pop-Up Window?
I'm building a bunch of video samples for my website using flash movies. They open in pop-up windows but when they are done playing the window... -
closing pop-up window
I have created a mail form in a pop-up window. After the mail has been send succesfull i would like the window to close (without having to click on... -
refresh parent window on close showModalDialog?
Is it possible to make the parent window refresh when a modal dialog is closed? I know I can use window.opener.location.reload(true); for a... -
Server side Window.open?
Ok, this has to be either easy, or impossible... I'd like to fire of a pop up window using serverside code... Basically its a preview popup of... -
Victor Garcia Aprea [MVP] #2
Re: closing showModalDialog window from server side
Hi jayuya,
Take a look at:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/dngrfwalkthroughtrackingserverprogressfromaspnetcl ientapplication.asp[/url]
--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
[url]http://obies.com/vga/blog.aspx[/url]
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
"jayuya" <jayuya@cox.net> wrote in message
news:065601c34a80$b4dd30d0$a401280a@phx.gbl...> I have a simple page that I will like to display while i
> am processing the user request in the server. The page
> only has a label saying "Please Wait..."
>
> My objective is to show this window while the code
> executes in the server but I can not close it after i am
> done... below is a sample code....
>
> thanks in advance...
> jayuya
>
> js = "<script language=javascript>window.showModalDialog
> ('StatusDisplay.aspx','','dialogWidth=475px;dialog Height=1
> 25px;status:no;help:no');</script>"
>
> 'displays window
> RegisterStartupScript("StatusStartPage", js)
> 'run code
> While minCounter <= maxCounter
> ////code to update records .....
> /////code
> minCounter = minCounter + 1 'looping to next power
> End While
>
> js = "<script language=javascript>window.close
> ();</script>"
>
> 'closes window
> RegisterStartupScript("StatusEndPage", js)
>
>
>
>
Victor Garcia Aprea [MVP] Guest
-
Vidar Petursson #3
Re: closing showModalDialog window from server side
Hi
Seems you are trying to close the dialog from the parent.. thats not
possible...
You have to close the Dialog from the dialog window and another thing the
parent
is blocked while this dialog is running
maybe a regular window ( window.open ) is a better choice
If using window.open you can poll the parent ( using
setTimeout/setInterval) for some variable/flag and close if present
and use <body onblur="window.focus()" .... to keep it on top
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"jayuya" <jayuya@cox.net> wrote in message
news:065601c34a80$b4dd30d0$a401280a@phx.gbl...> I have a simple page that I will like to display while i
> am processing the user request in the server. The page
> only has a label saying "Please Wait..."
>
> My objective is to show this window while the code
> executes in the server but I can not close it after i am
> done... below is a sample code....
>
> thanks in advance...
> jayuya
>
> js = "<script language=javascript>window.showModalDialog
> ('StatusDisplay.aspx','','dialogWidth=475px;dialog Height=1
> 25px;status:no;help:no');</script>"
>
> 'displays window
> RegisterStartupScript("StatusStartPage", js)
> 'run code
> While minCounter <= maxCounter
> ////code to update records .....
> /////code
> minCounter = minCounter + 1 'looping to next power
> End While
>
> js = "<script language=javascript>window.close
> ();</script>"
>
> 'closes window
> RegisterStartupScript("StatusEndPage", js)
>
>
>
>
Vidar Petursson Guest



Reply With Quote

