IE8 Not Calling Two JavaScript Functions via Onclick Event -
essentially want call 2 functions on onclick event. works fine in firefox , chrome not ie8!
the first function should call modal appear (modal indicates form in process of being saved - not appearing) while second function saves form , hide modal.
html
<a onclick="openmodal();saveform();">click me</a> <!-- modal --> <div id="mymodal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div id="modal"> <img id="loader" src="static/images/ajax-loader.gif" /> </div> </div>
javascript
function openmodal(){ $('#mymodal').modal('show'); } function saveform(){ //--- logic }
thank in advance!
i don’t listen event adding "onclick" attribute html element. instead, more practical use .addeventlistener. can recommend jquery. in jquery, write:
$('a').click(function(){ func1(); func2(); }
Comments
Post a Comment