/    Sign up×
Community /Pin to ProfileBookmark

Newbie needs help…

Hi,

I initially posted this message in the ASP forum but it was suggested that javascript could be used to solve this problem….

I would like to display a pop-up window containing some info when a user clicks on a hyperlink for a web page I built. In addition to a ‘Close Window’ button, I also want the pop-up window to have a checkbox that would give the user the option of not showing the pop-up every time he/she clicks on the hyperlink. If the user checks the checkbox, the pop-up window should not appear for the remainder of the session. I’m sure everyone has seen those “do not show this message again” checkboxes – this is exactly what I want to implement. When the pop-up window closes, the user should then be redirected to wherever the hyperlink was going to take them. I realize pop-ups are not ideal but I’m trying to get this to work regardless.

Is there anyone that could tell me how to do this, or preferrably show me an example? I’m certain some sort of session variable is involved, but I haven’t found any decent examples. Also one important thing, I would prefer not to use cookies if its possible….

Thanks for you time,

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@JMRKERMar 29.2009 — Do a search of google or this forum for "javascript popup window"

or some other word combination of what you are looking for.

There are tons of examples

?
Copy linkTweet thisAlerts:
@Intrepid353authorMar 30.2009 — I tried searching the forum and found lots of pop-up examples, but nothing related to implementing a "do not show this message again" checkbox on the pop-up window.

It seems like a relatively strightforward problem to solve but I'm having some real difficulty narrowing down a working solution. Thanks,
Copy linkTweet thisAlerts:
@JMRKERMar 30.2009 — In the program initialize a flag.

var NoPopUps = false;

After the first time the popup is shown, in the popup code do this

if (NoPopUps == true) { return; } else { NoPopUps = true; }

Wah-lah ... No popup shown after the first display.
×

Success!

Help @Intrepid353 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...