flakturnal Posted December 21, 2007 Share Posted December 21, 2007 Hi. I'm writing an inventory system in php. In one of the submit scenarios, I open a child window and submit data to the database where I then close the child window and refresh the parent window displaying the new data. This part works fine apart from the Internet Explorer refresh confirmation popup which disrupts the flow of the application. Is there anyway possible to disable this confirmation page?/ any help would be greatly appreciated. Regards. my parent contains this in the <head /> <script language="JavaScript" type="text/javascript"> function openChildWindow(ahtmlpath) {newWindow = window.open(ahtmlpath, "mywindow","width=400, height=600") if (navigator.appName,indexOf("Explorer") != -1) { newWindow.window.focus(); } else if (navigator.appVersion.indexOf("5") != -1) { newWindow.window.focus(); } } </script> with a button at the bottom of form to open child window: <input type="button" value="Add Style" onClick="window.openChildWindow('http://#########/#####/AddStyle.php')"> The child window contains: function reloadParent() { opener.location.reload(true); close(this); } With this button which closes the childl and reloads the parent: <input type="button" value="Close Window" onClick="reloadParent();"> Any thoughts? Cheers. Link to comment https://forums.phpfreaks.com/topic/82621-disable-refresh-confirmation/ Share on other sites More sharing options...
phpQuestioner Posted December 21, 2007 Share Posted December 21, 2007 why are you reloading the parent? why not just reset your form values? create a js validation script before the form variable are sent to the pop-up and if all the form values are validated; send form variable to pop-up and reset form values. Link to comment https://forums.phpfreaks.com/topic/82621-disable-refresh-confirmation/#findComment-420186 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.