post to database and close window
-
Hi there, i have run into some problems. i have a modaldialog box on my website, displaying some editable data. i want to do so when the save button has been clicked, it sends the data to the database and then closes the IE window without any confirmation. how do i do it? i have a close button on the page as well, can i simulate a click on that one at the end of my code? :)
-
Hi there, i have run into some problems. i have a modaldialog box on my website, displaying some editable data. i want to do so when the save button has been clicked, it sends the data to the database and then closes the IE window without any confirmation. how do i do it? i have a close button on the page as well, can i simulate a click on that one at the end of my code? :)
Hi, Does not window.close() work to close a modaldialog window? Juno MCSD.NET, MCDBA, MCSE ---------------------------------------------------------- Support Team of EasyDotNet, INC. http://www.EasyDotNet.com DataForm.NET - The most powerful data entry web server control for ASP.NET
-
Hi, Does not window.close() work to close a modaldialog window? Juno MCSD.NET, MCDBA, MCSE ---------------------------------------------------------- Support Team of EasyDotNet, INC. http://www.EasyDotNet.com DataForm.NET - The most powerful data entry web server control for ASP.NET
-
You can setup and call Javascript from the code behind and this how setup //call the method that sets up the client side javascript in you page load setupClientScript(); //Add an html attribute to the control that will trigger the javascript //add the html attribute to call the javascript funvtion this.ImageButton1.Attributes.Add("onClick","CloseWindow();"); //this is the method that sets up the Javascript and registers it private void setupClientScript() { string js = @" function CloseWindow() { window.close(); } "; //Register the script //Test if the script function CloseWindow is registered if (!IsClientScriptBlockRegistered("CloseWindow")) { RegisterClientScriptBlock( "CloseWindow", js ); } } zimcoder What Democracy?? Jesus Christ is King and if you do not like... well you can go to hell!
-
You can setup and call Javascript from the code behind and this how setup //call the method that sets up the client side javascript in you page load setupClientScript(); //Add an html attribute to the control that will trigger the javascript //add the html attribute to call the javascript funvtion this.ImageButton1.Attributes.Add("onClick","CloseWindow();"); //this is the method that sets up the Javascript and registers it private void setupClientScript() { string js = @" function CloseWindow() { window.close(); } "; //Register the script //Test if the script function CloseWindow is registered if (!IsClientScriptBlockRegistered("CloseWindow")) { RegisterClientScriptBlock( "CloseWindow", js ); } } zimcoder What Democracy?? Jesus Christ is King and if you do not like... well you can go to hell!