javascript - Add a pop up wait message in form action -


i have form action generates report. want add message pop please wait report loading

how can in js.

 <form action="step50/generatereport" method="get" id="form_generate">       <input style="margin-top: 20px;" type="submit" id="btngenerate"  value="generate"/>       </form> 

i trying this:

function popupprocessstatus(){                                       $.fancybox({href:'#display_status_inline', closebtn: true, helpers:{overlay: {closeclick:false}}});                                     }  <div id="display_status_inline" style="display: none">                  <br>             <p>please wait until report generated.</p>                                                        </div>  

but not sure call function display when btn clicked , go off when report generated.

just call function on submit:

var form = document.getelementbyid("form_generate"); form.addeventlistener("submit",popupprocessstatus,false); 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -