html - Run a javascript timer only once on aspx page -


i have function in site.master page displays popup after 30 sec. each time load subpage timer statrs on , pops again after 30 sec.

i need display once, whole time visiting website. here code.

settimeout(function() {     // run event...... }, 30000); 

probably easiest use session cookie determine if user has seen message:

if(!document.cookie.match(/sawmessage/)) {    settimeout(function() {      // run event......      document.cookie="sawmessage=true";    }, 30000); } 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -