Thursday, 29 August 2013

javascript doesn't work all the time in IE

javascript doesn't work all the time in IE

Using spring form tags in jsp.
Following is my script,which i am using for pagination :
function getNextPage(){
var next = document.getElementById('nextPageID');
next.checked=true;
var buttonName = document.getElementById('refreshbuttonID');
buttonName.click();
}
when user clicks Next in view (using jsp), onclick event I am calling the
getNextPage();
<button type="submit" onclick="getNextPage();">Next</button>
and I set hidden check-box to true
<td>
<form:checkbox id="nextPageID" path="nextPage"/>
<input type="hidden" value="1" name="_nextPage"/>
</td>
and then calling the method in controller to get next results and show on
page.
everything works fines in chrome and firefox, when it comes IE, some times
it does and sometimes doesn't. and page keeps refreshing with old data..It
works all the time in debug mode (even in IE)
It is not hitting the javascript in IE on some occassions. is there
something I am missing in function or something different to do in IE? Any
suggestions!

No comments:

Post a Comment