Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shadowbox not working....

    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

    Code:
    <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">

  • #2
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •