PDA

View Full Version : Disable modal pop-up for 10-minutes



taem
01-22-2015, 07:24 AM
Hi,

In my index.html, I have it load a modal on page load via:


<body onLoad="$('#contact').modal('show');">

The modal has a message of the day for our corporation. You can see it here: http://mmilescorp.com/

The issue I'm having is every time the user clicks on a button-link and comes back to the homepage, the modal popup pops back up. I see jscript has different timer functions, but I have no idea how I can make it so the modal only pops up once per user session. I don't think html/css has anything for this, and it seems more logical to code this in jscript directly onto the html page instead of making a new php page to load in. So any ideas on how to go about doing this?

FrickenTrevor
01-22-2015, 11:22 PM
Take a look at this (http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm). You can customize it so the pop up box only appears once per session. Also this would be in JavaScript (aka jscript)

taem
01-25-2015, 05:25 AM
Awesome! It worked perfectly with very little tweaking! Great script; thank you.