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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation HELP with "null" is null or not an object

    Hello,

    I run a vbulletin forum.
    Using mozilla, everything goes fine.
    But using IE, i always get a message "done but with errors on page". And them looking at error, i see "error: "null" is null or not an object"!


    I checked and this error comes from a javascript code i'm using.
    I'm using JK Popup generator script: http://www.javascriptkit.com/popwin/index.shtml

    Anyone can help me out?
    Thanks
    Last edited by xpgo; 05-11-2007 at 12:00 AM.

  • #2
    New Coder
    Join Date
    Apr 2007
    Location
    Chicken
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It would be helpfull to see the code, not a window with a way to generate multiple codes.... please give a direct link to the code, or post it. Thanks

    Matt

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Sure, here is the code i'm using, inside header template:


    Code:
    <script type="text/javascript">
    
    //JK Popup Window Script (version 3.0)- By JavaScript Kit(http://www.javascriptkit.com)
    //Visit JavaScriptKit.com for free JavaScripts
    //This notice must stay intact for legal use
    //Win Type: Pop Under | 5 minutes period
        
    //Specify URLs to randomly select from and popup/popunder:
    //To display a single URL, just remove all but the first entry below:
    var popurls=new Array()
    popurls[0]="http://www.mywebsitedomain.com"
    
    
    function openpopup(popurl){
    var winpops=window.open(popurl,"","width=820px,height=700px,scrollbars")
    winpops.blur()
    window.focus()
    }
    
    function get_cookie(Name) {
      var search = Name + "="
      var returnvalue = "";
      if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(search)
        if (offset != -1) { // if cookie exists
          offset += search.length
          // set index of beginning of value
          end = document.cookie.indexOf(";", offset);
          // set index of end of cookie value
          if (end == -1)
             end = document.cookie.length;
          returnvalue=unescape(document.cookie.substring(offset, end))
          }
       }
      return returnvalue;
    }
    
    popfrequency="5 minutes"
    
    function resetcookie(){
    var expireDate = new Date()
    expireDate.setMinutes(expireDate.getMinutes()-10)
    document.cookie = "jkpopunder=;path=/;expires=" + expireDate.toGMTString()
    }
    
    function loadornot(){
    if (get_cookie('jkpopunder')==''){
    openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
    var expireDate = new Date()
    expireDate.setMinutes(expireDate.getMinutes()+parseInt(popfrequency))
    document.cookie = "jkpopunder="+parseInt(popfrequency)+";path=/;expires=" + expireDate.toGMTString()
    }
    }
    
    if (get_cookie('jkpopunder')!=parseInt(popfrequency))
    resetcookie()
    loadornot()
    
    </script>

  • #4
    New Coder
    Join Date
    Apr 2007
    Location
    Chicken
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I wish I could help, but I dont know much about cookies..... you may wanna tell everyone else what it does though, and maybe post the html that relates to it

    Matt

  • #5
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it just opens a popup window to my visitors, every 5 minuts.

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Quote Originally Posted by xpgo View Post
    it just opens a popup window to my visitors, every 5 minuts.
    Most likely, the error is caused by a popup blocker preventing the popup. I haven't tried your code or anything, but that's my gut feeling.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #7
    New Coder
    Join Date
    Apr 2007
    Location
    Chicken
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, it's a pop-up blocker..... Just turn off your pop-up blocker and it works perfectly.


  •  

    Posting Permissions

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