Another Tip from alorentz: Rather than use the thickbox class and use the href location to populate the overlay with AJAX, there will certainly be a time when you do not want to show the href content in the overlay (like Javascript is disabled, and you still need the href to work, and so search engines don't pick up the AJAX purpose pages). So, you need to use onclick event of the link tag, and create a customized function in the thickbox.js file.
Example: <a href="http://www.google.com" onclick="dotb('Title For ThickBox', 'someotherurl.asp?width=700&height=500');return false;" title="Some Title">Click me</a>
So, you create a javascript function called dotb(title, url) and reference jquery library to open the overlay.
function dotb(title, url) { $(document).ready(function(){ tb_show(title, url, null); }); }
When the link is clicked, this will effectively open the overlay with the URL you pass and title you pass into the dotb(title, url) function, regardless of the actual href URL in the link and absence of "thickbox" class.
Good luck!
Keywords: thickbox, onclick, onload, jquery, href, click event |