Devildib
asked on
IE 11 issue form getting submitted twice
Hi Experts, I am working on a website written in classic asp and .net.
There is a particular code snippet which needed a change.The flow is from a modaldialog popup which is an .asp page to another intermediate(without UI) .asp page for this change.No, aspx involved. AFter the change, on debugging via F12 developer tools, I see that for some reason, on IE button click, the code snippet fires twice while on firefox all is good.There is a single post seen for firefox.Below is my code snippet :Please Help.
if (window.opener== null) {
window.dialogArguments.for m1.action = "/includes/test.asp?page=s omedotnetp age&id="+w indow.dial ogArgument s.form1.Hi dclientID. value;
window.dialogArguments.for m1.PIN.val ue = document.form1.pin.value;
window.dialogArguments.for m1.submit( );
}
else {
window.opener.document.get ElementByI d("form1") .action = "/includes/test.asp?page=s omedotnetp age&id="+o pener.docu ment.getEl ementById( "Hidclient ID").value ;
window.opener.document.get ElementByI d("PIN").v alue = document.getElementById('p in').value ;
window.opener.document.get ElementByI d("form1") .submit();
}
There is a particular code snippet which needed a change.The flow is from a modaldialog popup which is an .asp page to another intermediate(without UI) .asp page for this change.No, aspx involved. AFter the change, on debugging via F12 developer tools, I see that for some reason, on IE button click, the code snippet fires twice while on firefox all is good.There is a single post seen for firefox.Below is my code snippet :Please Help.
if (window.opener== null) {
window.dialogArguments.for
window.dialogArguments.for
window.dialogArguments.for
}
else {
window.opener.document.get
window.opener.document.get
window.opener.document.get
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I tried using return false but it did not work.Will changing type to submit and then using return false on top of it make any difference?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
It was some flag causing the issue.But your comments will surely help in future.
ASKER
<input type="button" id="btnSubmit" name="btnSubmit" value="Submit" onclick="myfunction();"/>