I'm working with a light box called LightWindow (
http://stickmanlabs.com/lightwindow/) And it works fine when I set it to load a webpage using a text link with code like this...
<a href="box-brazil.html" class="lightwindow" rel="[worldwide]" params="width=650" caption="Brazil -">Brazil<a/>
I'm looking for a javascript function that will basically do the same thing when run. I have this so far, and it's not working perfectly in all browsers...
Code:
<script type="text/javascript">
function loadWindow() {
var objLink = document.createElement('a');
objLink.setAttribute('href','box-brazil.html');
objLink.setAttribute('class', 'lightwindow')
objLink.setAttribute('caption', 'caption text');
myLightWindow.activateWindow(objLink);
}
</script>
When the function is run, it loads the
html file inside the lightwindow, but the caption doesn't show up in Firefox. IE has a number of other problems... Basically I need some javascript that will perform exactly like I had clicked the text link above, so the lightwindow script works correctly. I'm not sure if the javascript I'm using is incorrect, or if maybe the javascript for the lightwindow has bugs. I figure if the lightwindow works fine wit ha text link, then setting up some javascript to act like a text link would perform the same. If you have any ideas it would much appreciated! And if you need a better explanation on what I'm trying to do, let me know!