...

View Full Version : pop up window with "don't show again" checkbox



howie2009
07-29-2009, 10:01 AM
Hi Guys,
I want to create a how to pop up with a checkbox that the user can tick to not show the pop up again so it may need to have a cookie applied to it.
Anybody know how?
Thanks

Philip M
07-29-2009, 10:57 AM
Well, what you want is something like this in the pop-up

Instructions Here<br><br>

Don't show me these instructions again <input type = "checkbox" name = "chk1" id ="chk1" onclick = "makeCookie()">

Then if the checkbox is checked, set the cookie, and read it back in onload of the main page.

Remember that you need to provide some way of erasing the cookie as otherwise the user cannot change his mind and ask to see the instructions again.

But personally would prefer a simpler system which gives more control to the user:-


Check this box to see the instructions <input type = "checkbox" name - "chk1" id = "chk1" onclick = "showPop()">

<script type = "text/javascript">
function showPop() {
if (document.getElementById("chk1").checked == true) {
// show the pop-up
}

}
</script>

"I'm such a good lover because I practice a lot on my own." - Woody Allen

howie2009
07-29-2009, 11:04 AM
Thanks will give it a go.
PS I like the Woody Allen Quote! :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum