1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

xenforo.ajax error in ie9

Discussion in 'XenForo Development Discussions' started by marioman, Nov 10, 2013.

  1. marioman

    marioman Active Member

    hi,

    i have this javascript
    HTML:
    !function($, window, document, _undefined)
    {
        XenForo.toolbar = function($link)
        {
            XenForo.ajax(
                    $link.data('link'),
                    {},
                    function(ajaxData, textStatus)
                    {
                        if(ajaxData.templateHtml)
                        {
                            $('#toolbar2').html(ajaxData.templateHtml);
                        }
                    }
            );
        }
        XenForo.register('#toolbar', 'XenForo.toolbar');
    }
    (jQuery, this, document);
    it working fine in all browsers except ie
    i get this error ( The server responded with an error. The error message is in the JavaScript console. )
     
  2. EQnoble

    EQnoble Well-Known Member

    Go back to that page from ie and hit f12, then click the script tab, that is where the console is and where you normally can find a js error.

    I don't think this qualifies as a xenforo bug though (i am thinking this is your script not xf's).
     
  3. marioman

    marioman Active Member

    HTML1508: Unmatched end tag.
    forums.example.net, line 2876 character 1
    The "fb-root" div has not been created, auto-creating
    Unable to find menu for Popup [object Object]
    Unable to find menu for Popup [object Object]
    Unable to find menu for Popup [object Object]
    XenForo.init() 239ms. jQuery 1.10.1/1.2.8-dev
    Invalid App Id: Must be a number or numeric string representing the application id.
    FB.getLoginStatus() called before calling FB.init().
    FB.getLoginStatus() called before calling FB.init().
    SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.
    forums.example.net
     
  4. marioman

    marioman Active Member

    all places i used XenForo.ajax stopped working in ie
    is there error in my upper code ?
     
  5. marioman

    marioman Active Member

    used this

    Code:
    /** @param {jQuery} $ jQuery Object */
    !function($, window, document, _undefined)
    {
       XenForo.toolbar = function($link)
       {
         $link.ready(function(e){
           XenForo.ajax(
             $('#toolbar').data('link'),
             '',
             function(ajaxData, textStatus)
             {
               if(ajaxData.templateHtml)
               {
                 $(ajaxData.templateHtml).xfInsert('appendTo', '#here');
               }
             }
           );
         });
       }
       XenForo.register('#toolbar', 'XenForo.toolbar');
    }
    (jQuery, this, document);
    
    i still have same problem with ie only
     

Share This Page