I am having weird problem with IE9 in compatible mode(IE 7 standard) running Jquery(1.8.1) sometimes it runs the jQuery command other times it just does not take any action on the button when its clicked. The code is below for this simple page. I am using tiles to include resources like javascript , css.
When I click on the button sometimes it runs the logic other times it does not, I debugged using f12 I can see page has downloaded jQuery js for this to run. Please let me know what I have missed for this weird behavior.
<div style="margin: 50px 20px 50px 20px; text-align: center;">
<span>Do you want to submit this form ?</span>
<form>
<input id="yesButton" type="button" value="Yes"/>
<input id="noButton" type="button" value="No"/>
</form>
</div>
<script language="JavaScript">
$(document).ready(function() {
$('#yesButton').on('click', function() {
$('#yesButton').attr('disabled', 'disabled');
$('#noButton').attr('disabled', 'disabled');
window.location = contextRoot + '/imging/stre/${caseId}/${documentTypeCode}';
});
$('#noButton').on('click', function() {
$('#yesButton').attr('disabled', 'disabled');
$('#noButton').attr('disabled', 'disabled');
$.ajax({
url: contextRoot + '/imging/clr/${Id}/${documentTypeCode}',
type: 'POST',
dataType: 'text'
});
window.close();
});
});
</script>