This is a migrated thread and some comments may be shown as answers.

[Solved] Menu javascript error in IE7 only

4 Answers 37 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chad Thiele
Top achievements
Rank 1
Chad Thiele asked on 19 Mar 2010, 07:51 AM
If you load this page with IE7 there will be a javacript error and IE7 won't load the site correctly. If you load it in IE8, FF, etc... it runs fine.

The line with the error is this:

jQuery('#siteUserMenuWithBase').tMenu(); 

Which is a call to turn the siteUserMenuWithBase id into a Telerik Menu.

Any ideas why IE7 isn't liking this? Can't get anything to really get into a debugger... ;(

Thanks in advance!

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 19 Mar 2010, 10:00 AM
Hello Chad Thiele,

I think that for some reason in IE7 the JavaScript files loaded with google.load are retrieved asyncronously. As a result the tMenu() function is not registerd properly when the telerik.menu.js file is loaded. I suggest you try including jquery.js with <script> tag and see if this helps.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chad Thiele
Top achievements
Rank 1
answered on 19 Mar 2010, 10:29 AM
Thanks for the quick response. I made the change, but LitmusApp is still showing that the page doesn't load correctly on IE7.
0
Atanas Korchev
Telerik team
answered on 19 Mar 2010, 11:20 AM
Hi Chad Thiele,

I downloaded the output HTML of your page and tested it in IE7. It worked as expected at my end. Unfortunately I cannot debug a remote web site that easily. You can try removing the JavaScript files one by one to see which one is causing the problem. For some reason the menu javascript does not seem to find and properly extend the jQuery object this means this code:

$.fn.tMenu = function(options) {
        options = $.extend({}, $.fn.tMenu.defaults, options);

        return this.each(function() {
            options = $.meta ? $.extend({}, options, $(this).data()) : options;

            if (!$(this).data('tMenu'))
                $(this).data('tMenu', new $t.menu(this, options));
        });
    };
does not execute right.

I also found that you re using the <base /> tag. Could you  try removing it to see if it makes a difference?

I have attached the test HTML file that I used.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chad Thiele
Top achievements
Rank 1
answered on 19 Mar 2010, 11:56 AM
Thanks! It's working now.

Apparently, IE7 didn't like the <base> tag in the way I used it... luckily I didn't need it anymore. :D

Much appreciated!
Tags
Menu
Asked by
Chad Thiele
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Chad Thiele
Top achievements
Rank 1
Share this question
or