Thickbox onLoad popup

I’m looking to make a Thickbox popup whenever a user loads a page. Any suggestions on how to do this are greatly appreciated.
Thanks!

Try

 
window.onload=function(){TB_show("Google", "http://www.google.com", false);}

or read:

Hi spikeZ,
Thanks for the quick reply!

I have tried that code but maybe I am unaware of where to put it?

I have also read that article before but still can’t seem to get it working. (Nor can I seem to find a demo of it in action anywhere)

Thanks!

Hi Richard,

Here is a quick example using the jQuery $() code rather than window.onload.
I have 2 images in the same folder as the page: Creek.jpg and Forest.jpg

Forest will load when the window loads and Creek onClick.

<!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=iso-8859-1">
	<meta name="author" content="">

	<title>Thickbox - onLoad</title>
	<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>
<script>
$(document).ready(function(){
	tb_show("Forest Pic","Forest.jpg",false);
});
</script>
<body>

<p>To show onClick:</p>
<a href="Creek.jpg" class="thickbox" ><img src="Creek.jpg"></a>

	

</body>
</html>

Copy and paste and make sure your paths are correct :slight_smile:

Cheers