473,383 Members | 1,846 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.

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)


Nov 17 '05 #1
3 12268
Hi jayuya,

Take a look at:
http://msdn.microsoft.com/library/de...pplication.asp

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
"jayuya" <ja****@cox.net> wrote in message
news:06****************************@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)

Nov 17 '05 #2
Hi jayuya,

Take a look at:
http://msdn.microsoft.com/library/de...pplication.asp

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
"jayuya" <ja****@cox.net> wrote in message
news:06****************************@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)

Nov 17 '05 #3
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" <ja****@cox.net> wrote in message
news:06****************************@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)

Nov 17 '05 #4

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

Similar topics

0
by: jayuya | last post by:
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...
6
by: sramruttun | last post by:
hi I open a pop up window using window.showModalDialog. How can I close the parent window after the pop up appears ?
2
by: IAmSoNeat | last post by:
The showModalDialog has an argument parameter that will allow the modaldialog to access it through the client side property: dialogArguments. Is there any way to access this property on the...
3
by: PeeBee | last post by:
I have researched the issue of setting the title of a window created with a call to showModalDialog. I have found numerous articles, but nothing that answers my particular case (Code abbreviated...
4
by: MW de Jager | last post by:
I want to call ShowModalDialog(...) from my C# code in the code behind page of my aspx page. I do not want to link this to a button, since I want to first do some checking myself before I call the...
3
by: Chrysan | last post by:
I have a popup window, which consist of a asp:textbox and a asp:button. And, I would like to pass the textbox.text to the javascript function when I click the button. Besides, by clicking the...
1
by: dan_williams | last post by:
I'm trying to create a textbox control on an asp.net web page, that after a user has typed some text into it, another pop-up window appears with a dropdownlist populated with options related to the...
4
by: Ralf | last post by:
Here is my scenerio and what I am doing. I am open to other ways of doing this is it makes sense. I have a cell withing a row within a datagrid. When this cell is clicked (its a date field), I...
2
by: Luqman | last post by:
How can I open another WebForm in ASP.Net / VS 2005 without closing the Current Webform. I tried using Server.Transfer("Form2.Aspx",True) on Button_Click of Form1 but it close the current web...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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.