• 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

marioman

Active member
#1
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. )
 

EQnoble

Well-known member
#2
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).
 

marioman

Active member
#3
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
 

marioman

Active member
#5
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