javascript - submit form, reload parent, and close child -
i have issue cross-ie issue, not cross-browser one.
i trying open child window, user submit form. on submission, php script should called load child form data. child should reload parent window containing of content added in child form, , close child form...
users not have other browser in use other ie, different versions (i prefer make compliant, settle different ies). have had no trouble in ie10, can't work in ie8. there users must use ie8 (they stuck on xp due other software won't run on 7 or 8).
i have tried this:
<form name="parts" id="parts" action="tableaddrow_nw.php" method="get" onsubmit="window.opener.document.location.href='q.php?q=<?php echo $q; ?>&memberid=<?php echo $memberid; ?>'; self.close();">
i have tried this:
<form name="parts" id="parts" action="tableaddrow_nw.php" method="get"> <input type="button" value="save & close window" class="submit" onclick="validaterow(this.form);"
where validaterow(this.form);
function :
function validaterow(frm) { frm.submit(); window.opener.document.location.href='q.php?q=<?php echo $q; ?>&memberid=<?php echo $memberid; ?>'; this.window.close(); }
i've reversed submit , reload, read on on posting, doesn't work me.
the php code works fine, since it's in ie10 version. basically, removes previous entries, reads array sent in, , checks verify indexes valid, , loads array data in again.
if don't close window, works fine in both versions. guess i'm hoping can me still close window on submit, maybe wait long enough verify submit successful.
thanks in advance help.
i managed solve in 1 of aha! moments.
i used
if ( $.browser.msie ) { if ( $.browser.version == "10.0" ) { this.window.close(); } }
in order tell ie10 close window.
and in script form action (tableaddrow_nw.php) spits out data entered database, added "close window" button.
<form method="post"> <input type="button" value="close window" onclick="window.close()" /> </form>
so if it's ie8, window doesn't close, close button. in 1e10, window closes. it's 1 more click ie8 users, there nothing can until major supplier of industrial tools (who won't mention name) gets software little more modern.
Comments
Post a Comment