...

View Full Version : Shadowbox not working....



bdub17
02-21-2011, 05:30 PM
Hello all,

I'm trying to get a pop up to open as soon as a page loads. Additionally, I want to image to link to another page.

Below is the script. Any idea? Thanks


<script type="text/javascript">

function setCookie(isName,isVal) {
document.cookie = isName + "=" + isVal + ";expires=" + "path=/";
}

function getCookie(isName){
cookieStr = document.cookie;
startSlice = cookieStr.indexOf(isName+"=");
if (startSlice == -1) {return null;}
endSlice = cookieStr.indexOf(";",startSlice+1);
if (endSlice == -1){endSlice = cookieStr.length}
isData = cookieStr.substring(startSlice,endSlice)
isValue = isData.substring(isData.indexOf("=")+1,isData.length);
return isValue;
}

window.onload = function(){
if ( getCookie('myCookie') != null ) return;
setCookie('myCookie', 'ANY VALUE');

Shadowbox.init({
players: [ 'html']
});

Shadowbox.open({
player : 'iframe',
height: 317,
width: 625,
content : 'ask.jpg'
});

};
</script>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="shadowbox.js"></script>
<link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css">

bdub17
02-21-2011, 10:49 PM
I found part of the problem. Since it's I frame, I need to switch out the jpg with an html link. I did that and it's still not working. Any other ideas?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum