Tuesday, 27 August 2013

Inside (if) 2 arguments not working on Firefox

Inside (if) 2 arguments not working on Firefox

I've a code working on most browsers except firefox. That is launched from
a submit form. I just want to give "agree" as true and then close window
when accepted. If I delete the closing argument will do it right on both
FF and Chrome.
<script type="text/javascript">
function confirmSubmit() {
var agree = confirm("¿Estas seguro de anular esta reserva?");
if (agree) {
window.parent.close();
return true;
} else {
return false;
}
}
The problem is having both options inside the if, but the window.close()
works okay on both. Thanks in advance

No comments:

Post a Comment