javascript - Loading image not displaying on Safari 7/8/9 on form submission -


i representing common issue here weird behavior. hoping mistake cleared out or solution. trying show loading image upon submission of form clicking button. using simple htmls , javascript on jsp page. below code reference -

<input type="button" onclick="submitform('myaction','mycontext')" />  <div id="progressbar" style="display:none;">  <img id="gifimg" src="../images/load.gif"> </div>  function submitform(action, originalcontext){     document.getelementbyid('progressbar').style.display='block';     document.forms[0].action = document.forms[0].action + "?method=" + action + "&originalcontext=" + originalcontext;     document.forms[0].submit();     return; } 

issue - above code works fine in universe except safari 7, 8, 9 on mac 10.9, 10.10, 10.11 respectively. appreciate if can , suggest. thank :)

are browsers angry onclick attribute?

<input id="fibble" type="button" value="click">  <div id="progressbar" style="display:none;">  loading </div>   document.getelementbyid('fibble').addeventlistener('click', submitform);  function submitform(action, originalcontext){     document.getelementbyid('progressbar').style.display='block';     return; } 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -