Click here to Skip to main content
16,017,261 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I want to display a popup in a website after a user visits it.

Currently I am doing this by firing a javascript from my homepage using document.ready, but everytime the user comes back to the homepage without closing the website, the popup is displayed.

I want to popup to get fired only once after the website is loaded. How to achieve this??

Thanks
Posted
Comments
VICK 7-Oct-13 0:58am    
Do you want to show the popup on some specific location or time??
E.g you want to show the popup on successfull login or after being logout???

You need to store it somewhere.

Not sure if this is an anonymous site, but irrespective of that the option could be to store if the user has visited site in cookie, database on sever etc.

In document ready, check if you have already shown the popup once otherwise go ahead and show the message.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900