Is there any way, using a server control, to execute a routine (say, add
record to database) and then close the browser window. I'm having a
difficult time doing this using a master\detail model where dialog apsx page
is opened when datagrid item on master page is clicked. Would like to be
able to have detail open in the html dialog where user can edit record, then
click save button to save changes to database, call opener routine to
refresh master data grid, and close the page.
This seems like it must be a pretty common data managment scenario, so I
would assume that there would be a simple means of achieving this.
Have tried using RegisterclientScriptBlock to write a window.close within
the page that is opened as a dialog , but it won't close the window. 4 4975
"DM" <da*******************@cfl.rr.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Is there any way, using a server control, to execute a routine (say, add record to database) and then close the browser window. I'm having a difficult time doing this using a master\detail model where dialog apsx
page is opened when datagrid item on master page is clicked. Would like to be able to have detail open in the html dialog where user can edit record,
then click save button to save changes to database, call opener routine to refresh master data grid, and close the page.
This seems like it must be a pretty common data managment scenario, so I would assume that there would be a simple means of achieving this.
Have tried using RegisterclientScriptBlock to write a window.close within the page that is opened as a dialog , but it won't close the window.
Any error messages?
How are you writing this script? You need <script> tags around it!
There is also a "RegisterStartupScript" that you might use for this.
Hans Kesting
After database udpate routine I call the following function:
Private Sub ReloadParent()
Dim strScript As String = "<script language='javascript'>" & vbCrLf
strScript += " window.close();" & vbCrLf
strScript += "</script>" & vbCrLf
RegisterClientScriptBlock("CloseScript", strScript)
End Sub
I'm not getting any error messages, it just doesn't do anything.
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:u7**************@TK2MSFTNGP11.phx.gbl... "DM" <da*******************@cfl.rr.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Is there any way, using a server control, to execute a routine (say, add record to database) and then close the browser window. I'm having a difficult time doing this using a master\detail model where dialog apsx page is opened when datagrid item on master page is clicked. Would like to
be able to have detail open in the html dialog where user can edit record, then click save button to save changes to database, call opener routine to refresh master data grid, and close the page.
This seems like it must be a pretty common data managment scenario, so I would assume that there would be a simple means of achieving this.
Have tried using RegisterclientScriptBlock to write a window.close
within the page that is opened as a dialog , but it won't close the window.
Any error messages? How are you writing this script? You need <script> tags around it! There is also a "RegisterStartupScript" that you might use for this.
Hans Kesting
It seems as though the window is closing, but is being re-opened when the
dialog attempts to call the opener's routine to refresh the master data grid
because the opener's startup script used to open the dialog when a datagrid
item is selected is being run again. Is there any way to unregister a
script block?
"DM" <da*******************@cfl.rr.com> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl... After database udpate routine I call the following function:
Private Sub ReloadParent()
Dim strScript As String = "<script language='javascript'>" & vbCrLf
strScript += " window.close();" & vbCrLf
strScript += "</script>" & vbCrLf
RegisterClientScriptBlock("CloseScript", strScript)
End Sub
I'm not getting any error messages, it just doesn't do anything.
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message news:u7**************@TK2MSFTNGP11.phx.gbl... "DM" <da*******************@cfl.rr.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Is there any way, using a server control, to execute a routine (say,
add record to database) and then close the browser window. I'm having a difficult time doing this using a master\detail model where dialog
apsx page is opened when datagrid item on master page is clicked. Would like to be able to have detail open in the html dialog where user can edit
record, then click save button to save changes to database, call opener routine to refresh master data grid, and close the page.
This seems like it must be a pretty common data managment scenario, so
I would assume that there would be a simple means of achieving this.
Have tried using RegisterclientScriptBlock to write a window.close
within the page that is opened as a dialog , but it won't close the window.
Any error messages? How are you writing this script? You need <script> tags around it! There is also a "RegisterStartupScript" that you might use for this.
Hans Kesting
see http://www.lostinet.com/en/lwsamplec...controlhelper/ http://www.lostinet.com/en/lwsamplec...dialogelement/
for my sample
-- http://www.lostinet.com/
Lostinet.Web Controls&Components help you to build better Asp.Net
CustomerControl&UserControl&Application.
ControlHelper&HelperElement for MessageBox&Dialog
ComboBox,ComboCalendar,SmartIframe
Remote Asp.Net Execution
"DM" <da*******************@cfl.rr.com> дÈëÓʼþ
news:%2****************@tk2msftngp13.phx.gbl... Is there any way, using a server control, to execute a routine (say, add record to database) and then close the browser window. I'm having a difficult time doing this using a master\detail model where dialog apsx
page is opened when datagrid item on master page is clicked. Would like to be able to have detail open in the html dialog where user can edit record,
then click save button to save changes to database, call opener routine to refresh master data grid, and close the page.
This seems like it must be a pretty common data managment scenario, so I would assume that there would be a simple means of achieving this.
Have tried using RegisterclientScriptBlock to write a window.close within the page that is opened as a dialog , but it won't close the window.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: hawkon |
last post by:
Hi all,
I have an important question to ask about how to trap events when the user
close the browser window.
I'm a ASP programmer and I have s MSSQL database with a user table where I'm able to...
|
by: Derek |
last post by:
Hello:
I want to capture the event when a browser is closing, to give to the user
the posibility of close or no this browser. When the browser is closing,
this show a confirm window with two...
|
by: Max Dupenois |
last post by:
I've seen numerous articles with similair (similar sp?) titles to this
in my search.. unfortunately none of them seem to contain what i want,
(or if they do i need someone to point out my stupidity...
|
by: bbass |
last post by:
thanks to all that replyied to my previous post with the following code
in question:
<a href="merc.htm" target="_new_merc" onfocusout=window.close
class="left_link">
i understand that the...
|
by: Chirag Malvi |
last post by:
hello all,
I am developing the web application using ASP.net and VS.2003 IDE.
here is the situation which i want to implement.
1) User is browsing some webform. I want to trap this event....
|
by: Uma Muthu |
last post by:
Hello Everyone,
How can I capture the event of closing the IE browser from within an ASP.NET
web application?
TIA,
Uma
|
by: Rich |
last post by:
I have the following script on all pop up windows,
would like to have this work on all newer browsers if
possible. Right now it only works on MSIE & Opera.
Not sure why. Any suggestions are...
|
by: Santel |
last post by:
Hi,
I would like to do some server side actions while closing the browser
window. I tried with Page_Unload event, but it triggers while loading
the page itself. Anyone please tell me is there...
|
by: karthik juneni |
last post by:
Hi all,
Iam trying to capture windows closing event (i.e) when the user clicks
on the "X" button i want to capture that event and want to update some
values in the database.I tried two methods...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
header("Location:".$urlback);
Is this the right layout the...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
| |