From: Steven L. <st...@tu...> - 2005-02-09 15:18:36
|
On Tue, 2005-02-08 at 22:14 -0500, Tony Miller wrote: > Thanks for the suggestion, I seem to be hitting the javascript on submit, > the window is closing, the parent form is refreshing, but the information > is not being submitted. Here are snippets of the generated HTML. > > <form id="editcigarid" name="editcigar" action="index.php" method="post"> > <input type="hidden" name="module" value="cigardiary" /> > <input type="hidden" name="CC_OP" value="save" /> > > ... > > <script type="text/javascript"> > //<![CDATA[ > > document.getElementById('editcigarid').onsubmit=function dropWindow() { > window.opener.location.reload(true); > window.close(); > return true; > } > > //]]> > </script> > > It should be returning true to the "onsubmit" forcing it to submit the > data to the server. > > So far in my travels I've been able to either > > 1. Save the data and not close the popup and refresh the parent window. > > 2. Close the popup and refresh the parent window but not save the data. Try doing this instead of using the onsubmit feature of a form. Just let the post go through as normal without the use of any javascript. Then when the popup refreshes after a successful post load this into the window. <script type="text/javascript"> //<![CDATA[ document.onload = function dropWindow() { window.opener.location.reload(true); window.close(); } //]]> </script> Not positive it will work, but it is worth a try. -- Steven |