Re: POPUP lightbox onload
Why don't you just pop a JavaScript alert with an Okay Cancel button? It would be so much easier.
Re: POPUP lightbox onload
What i like about the lightbox/TB is that it produces an overlay of the main page.
Is that possible in the method you suggested?
Oh and that code i used above is just ugly coding :) not mine of course
Re: POPUP lightbox onload
oh i want to mention that i would like to have it as a per session popup as well
Re: POPUP lightbox onload
peej:
How about a way to pop a link open automatically using lightbox and js?
If you go to that page now you will see a link on the left and when clicked it opens LB. i want that to open automatically
Re: POPUP lightbox onload
There are both positives and negatives to using JavaScript's confirm(). Using lightbox frameworks will require some editing since they can easily be dismissed by just clicking around them. So, you would have to write your own, or modify previously existing ones. This could take some time.
If you use Javascript's confirm(), then you will lose some extra graphical possibilites, but you will easily be able to ask the user if he/she is 18 or older. This shows modally, so you cannot just dismiss it without answering.
To solve the "once per session" issue is by using a cookie.
Re: POPUP lightbox onload
Quote:
Originally Posted by
PeejAvery
There are both positives and negatives to using JavaScript's confirm(). Using lightbox frameworks will require some editing since they can easily be dismissed by just clicking around them. So, you would have to write your own, or modify previously existing ones. This could take some time.
If you use Javascript's confirm(), then you will lose some extra graphical possibilites, but you will easily be able to ask the user if he/she is 18 or older. This shows modally, so you cannot just dismiss it without answering.
To solve the "once per session" issue is by using a cookie.
Hmmmm i guess i have some more digging. What i really am looking for is not age verification but a pop up that has links in it
Just so happens that the look i like was on an adult site (referenced in another forum )
one for members---------login page
and one to registe----->goes to registration page
Re: POPUP lightbox onload
In that case, you won't be able to use confirm().
Re: POPUP lightbox onload
Quote:
Originally Posted by
PeejAvery
In that case, you won't be able to use confirm().
any recommendations
Re: POPUP lightbox onload
ok so i have the following code working but how in the heck do i get it to load on page load per user session?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="thickbox.js"></script>
<link rel="stylesheet" href="thickbox.css" type="text/css" media="screen" />
</head>
<body>
<a href="ajaxOverFlow.html?height=300&width=300" title="add a caption to title attribute / or leave blank" class="thickbox">Scrolling content</a>
<a href="ajax.PHP?height=220&width=400" class="thickbox" title="add a caption to title attribute / or leave blank">No-scroll content</a>
<a href="ajaxLogin.html?height=85&width=250&modal=true" class="thickbox" title="Please Sign In">login (modal)</a>
<a href="ajaxTBcontent.html?height=200&width=300" class="thickbox" title="">Update ThickBox content</a>
</body>
</html>
Re: POPUP lightbox onload
Use a cookie with 0 lifetime. Check to see if the cookie exists...if it doesn't show the lightbox and create the cookie.
1 Attachment(s)
Re: POPUP lightbox onload
Quote:
Originally Posted by
PeejAvery
Use a cookie with 0 lifetime. Check to see if the cookie exists...if it doesn't show the lightbox and create the cookie.
Ok so i found exactly what im looking for
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<link rel="meta" href="http://fantasti.cc/labels.rdf" type="application/rdf+xml" title="ICRA labels">
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="http://knapsack.fantasti.cc/templates/site/ie.css" > <![endif]-->
<link rel="stylesheet" href="rtainment_files/fantasticc_styles.css" type="text/css" media="screen">
<script type="text/javascript" src="rtainment_files/jquery.js"></script>
<script type="text/javascript" src="rtainment_files/jquery-ui.js"></script>
<script type="text/javascript" src="rtainment_files/thesocialcell.js"></script>
</head>
<body>
<div class="TB_overlayBG" id="TB_overlay"></div>
<div style="margin-left: -195px; width: 390px; margin-top: -200px; display: block;" id="TB_window">
<div id="TB_ajaxContent" class="TB_modal" style="width: 360px; height: 355px;">
<div style="padding: 6px;">
<div class="help_title_disc" style="line-height: 100%; margin-bottom: 20px;">
This website needs members to be registered
</div>
<div style="font-size: 14px; line-height: 120%;">
By entering this site I am agreeing with the following statements:<br>
I am a member
</div>
<div class="enterexit">
<span class="enter"><a style="color: rgb(0, 153, 0);" href="#" onclick="$('#disc_fla').css('display','inline');tb_remove();document.cookie = 'disclaimer=true; expires=Thu, 2 Aug 2010 20:00:00 UTC; path=/';return false;" title="I agree">Enter</a></span>
<span class="exit"><a style="color: rgb(204, 204, 204);" href="http://www.wikipedia.org/" id="leave">Leave</a></span>
<p style="font-size: 14px;">
Cookies must be <a target="_blank" href="http://www.google.com/support/accounts/bin/answer.py?answer=61416&hl=en&ctx=ch_ServiceLoginAuth&p=mail" title="click here if you don't know how to enable cookies">enabled</a>
</p>
</div></div>
</div></div><div style="position: absolute; display: none;" id="jHelperTipContainer"></div><div style="display: none;" id="reportx"></div><div style="position: absolute; display: none;" id="jHelperTipAttrContainer"></div><div style="display: none;" id="helpx"></div>
</body></html>
But cookies are not working. i want it to only show per session
grrrrrrrrrrrrrrrr
Peej thanks for the help BTW.
I attached files
Re: POPUP lightbox onload
Quote:
Originally Posted by
davidjmorin
But cookies are not working.
That's because you aren't doing what I mentioned in the previous post.
Code:
<script type="text/javascript">
if (document.cookie.indexOf("lightbox=") == -1) {
var now = new Date();
document.cookie = "lightbox=yes";
// code to show the lightbox here
}
</script>
Re: POPUP lightbox onload
? like so?
I do not work with js much and have been out of programming for a long time :) sorry if i sound stupid peej
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<link rel="meta" href="http://fantasti.cc/labels.rdf" type="application/rdf+xml" title="ICRA labels">
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="http://knapsack.fantasti.cc/templates/site/ie.css" > <![endif]-->
<link rel="stylesheet" href="rtainment_files/fantasticc_styles.css" type="text/css" media="screen">
<script type="text/javascript" src="rtainment_files/jquery.js"></script>
<script type="text/javascript" src="rtainment_files/jquery-ui.js"></script>
<script type="text/javascript" src="rtainment_files/fantasticc.js"></script>
<script type="text/javascript">
if (document.cookie.indexOf("lightbox=") == -1) {
var now = new Date();
document.cookie = "lightbox=yes";
// code to show the lightbox here
}
</script>
</head>
<body>
<div class="TB_overlayBG" id="TB_overlay"></div>
<div style="margin-left: -195px; width: 390px; margin-top: -200px; display: block;" id="TB_window">
<div id="TB_ajaxContent" class="TB_modal" style="width: 360px; height: 355px;">
<div style="padding: 6px;">
<div class="help_title_disc" style="line-height: 100%; margin-bottom: 20px;">
This website needs members to be registered
</div>
<div style="font-size: 14px; line-height: 120%;">
By entering this site I am agreeing with the following statements:<br>
I am a member
</div>
<div class="enterexit">
<span class="enter"><a style="color: rgb(0, 153, 0);" href="#" onclick="$('#disc_fla').css('display','inline');tb_remove();document.cookie = 'disclaimer=true; expires=0; path=/';return false;" title="I agree">Enter</a></span>
<span class="exit"><a style="color: rgb(204, 204, 204);" href="register.php" id="leave">Register</a></span>
<p style="font-size: 14px;">
Cookies must be <a target="_blank" href="http://www.google.com/support/accounts/bin/answer.py?answer=61416&hl=en&ctx=ch_ServiceLoginAuth&p=mail" title="click here if you don't know how to enable cookies">enabled</a>
</p>
</div></div>
</div></div><div style="position: absolute; display: none;" id="jHelperTipContainer"></div><div style="display: none;" id="reportx"></div><div style="position: absolute; display: none;" id="jHelperTipAttrContainer"></div><div style="display: none;" id="helpx"></div>
</body></html>
I have it live here http://thesocialcell.com/codeguru.htm
Re: POPUP lightbox onload
See my code comment about showing the lightbox? That's where you ned to put the code that triggers the showing of the lightbox.