php - Launch a new tab and reload original page -



php - Launch a new tab and reload original page -

in lamp stack application create invoices in pdf format. first screen allows selections of purchase items included in invoice. pdf opens in new tab using $_posted form info works fine, simultaneously reload first page update status of purchases selected pdf invoice , want selection screen reflect this. ideas anyone? nb native javascript or php solutions please.

perhaps this:

<a onclick="open_in_new_tab_and_reload('./path_to_pdf.pdf')" href="#">pdf</a> <script> function open_in_new_tab_and_reload(url) { //open in new tab window.open(url, '_blank'); //focus thet window window.focus(); //reload current page location.reload(); } </script>

php javascript html

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -