Javascript submit does not work at times in chrome -
i have custom dialog box takes user input , submit form based on user input. javascript works fine on ie , firefox. works on chrome @ times @ times there no response.
<html> <head> <script type="text/javascript"> window.onblur = function() { window.focus(); } var realtimepolink = "./processabc.do"; var realtimepomethod = "startabc"; var nightlypolink = "./processxyz.do"; var nightlypomethod= "startxyz"; function startpo(){ var historyporadio = document.getelementbyid("nightlyporadio"); if(historyporadio !=null && historyporadio.checked == true){ document.getelementbyid("method").value = nightlypomethod; document.getelementbyid("postartform").action = nightlypolink; } else{ document.getelementbyid("method").value = realtimepomethod; document.getelementbyid("postartform").action = realtimepolink; } document.forms["postartform"].submit(); window.close(); } </script> </head> <body> <form name="postartform" id ="postartform" method="post" action="" target="assiamainwindow"> <input type="hidden" name="tn" value="0000010019"> <input type="hidden" name="portid" value=""> <input type="hidden" name="method" id="method" value="startpo"> <input type="hidden" name="confirmation" value="yes"> <table> <tr> <td> <input type="radio" name="posourcevalue" value="1" checked="checked"> <td>abc </tr> <tr> <td> <input type="radio" name="posourcevalue" value="2"> <td>mno </tr> <tr> <td> <input type="radio" name="posourcevalue" value="3" id="nightlyporadio"> <td>xyz </tr> <tr> <td colspan="2" align="center"> <input type="button" value="start" onclick="javascript:startpo();"/> <input type="button" value="cancel" onclick="javascript:window.close();"/> </tr> </table> </form> </body> </html>
irrespective of whether form submitted or not dialog box closed.
Comments
Post a Comment