Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript submit does not work at times in chrome
    primarykey
    data
    text
    <p>I have a custom dialog box which takes user input and submit the form based on user input. This javascript works fine on IE and Firefox. It also works on chrome at times but at times there is no response.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; 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 &amp;&amp; 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(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form name="poStartForm" id ="poStartForm" method="POST" action="" target="ASSIAMainWindow"&gt; &lt;input type="hidden" name="tn" value="0000010019"&gt; &lt;input type="hidden" name="portId" value=""&gt; &lt;input type="hidden" name="method" id="method" value="startPo"&gt; &lt;input type="hidden" name="confirmation" value="YES"&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="poSourceValue" value="1" checked="checked"&gt; &lt;td&gt;ABC &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="poSourceValue" value="2"&gt; &lt;td&gt;MNO &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="radio" name="poSourceValue" value="3" id="nightlyPoRadio"&gt; &lt;td&gt;XYZ &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" align="center"&gt; &lt;input type="button" value="Start" onclick="javascript:startPO();"/&gt; &lt;input type="button" value="Cancel" onclick="javascript:window.close();"/&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Irrespective of whether the form is submitted or not the dialog box is always closed. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload