I have come across few scripts like greybox, thickbox,etc They are used to create pop-up when you click a link or a image. eg: http://puke.in/ Click the Example 1 It opens a pop-up box. script used : http://jquery.com/demo/thickbox/ My need: I need that box to pop-up as soon as the page loads. Please help me how to do this. If not possible with this script recommend me a script free/paid that can create these kind of ajax pop-up with
this is no POPUP, this is a DIV-layer a popup is a totally new window. you can achieve such a div-layer on loading easily. if you want i give you a complete solution for $10 paypal. i have no time to do it for free.
No. Don't waste your $10 for this little thing. Simply add the code to your body onload. Here is a working example with Greybox. <body onload="GB_show('Google rox!', 'http://google.com');"> Code (markup):
Thanks a lot.. But I think its for GreyBox.. I am using the ThickBox script is there a similar workaround for it ?? EDIT: Its possible I used tb_show instead of GB thanks djzmo you can see it at http://puke.in/ but its not working in IE can you help ??
Sorry for the late respond. Try to add the function into your (document).ready. Example: $(document).ready( function() { tb_show('The title', 'thepage.html?width=300&height=300', false); }); Code (markup): I haven't tested it anyway.
I wrote my own library to handle that sort of thing - feel free to use it, though it is designed for content inlined in the markup not at a separate address - if you want to load them from a separate address you could simply put an IFRAME in the advert div. Not well documented yet though.