Jump to content

jQuery working in Firefox but not IE9


Guernica
 Share

Recommended Posts

Hey there, I am having a problem with the jquery on my website with Internet Explorer. I have only tested it in IE9 but what i does is it doesn't hide the dropdowns for the list on the right side.

 

The code is like this:

 

<script type="text/javascript">
jQuery.noConflict();

    function initMenu() {
    jQuery('#resources ul').hide();
    jQuery('#resources li a').click(
    function() {
    var checkElement = jQuery(this).next();
var one = jQuery(this);
    if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
    return false;
    }
    if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
    jQuery('#resources ul:visible').slideUp('normal');
jQuery('#resources li a').removeClass('selected');
    checkElement.slideDown('normal');
one.addClass('selected');
    return false;
    }
    }
    );
    }
jQuery(function(){
      // bind change event to select
      jQuery('#jumpMenu').bind('change', function () {
          var url = jQuery(this).val(); // get selected value
          if (url) { // require a URL
              window.location = url; // redirect
          }
          return false;
      });
    });
    jQuery(document).ready(function() {initMenu();});

jQuery(document).ready(function(){
jQuery(function () {
jQuery('div.iframe').load("forum/index.php #navbar");
});
});
</script>

 

It works well in Firefox, however I have noticed that every once in a while it will not load the jquery fully  when I go to a new page and the dropdowns will show up expanded instead of collapsed which should be the default.

 

Here is an example of the page:

http://bfgamerz.com/downloads.php?id=38&key=Project-Reality-v095-Full-Client

 

It is also making the popup not working correctly (you have to be logged in to view it) but the popup is just like this:

 

<script language="javascript" type="text/javascript">

function popup(url,title,height,width,extras){
var windowoptions = 'height=' + height + ',width=' + width + ',' + extras + '';
windoww = window.open(url,title,windowoptions);
if (window.focus) {windoww.focus()}
return false;
}
</script>

 

Thanks for any help.

Link to comment
Share on other sites

When I hit F12 and the debugger window opens the 3 items listed are as follows:

 

SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.

bfgamerz.com

SCRIPT5009: 'vBulletin_init' is undefined

bfgamerz.com, line 980 character 2

SCRIPT438: Object doesn't support property or method 'observe'

bfgamerz.com, line 986 character 1

 

Nothing about jQuery or javascript errors. How do I find out the problem with the debugger? Sorry I am new to this in IE.

 

Thank you!

Link to comment
Share on other sites

SCRIPT5009: 'vBulletin_init' is undefined

bfgamerz.com, line 980 character 2

 

you'll need to make sure it's defined, if not, remove it from your code. the consule will give you the line to look at. This error could be blocking the rest of the script.

Link to comment
Share on other sites

Okay I've cleared up the vbulletin errors and the footer snippets that were causing an error. Now I just have an error in my popup javascript function:

 

function popup(url,title,height,width,extras){

var windowoptions = 'height=' + height + ',width=' + width + ',' + extras + '';

windoww = window.open(url,title,windowoptions);

if (window.focus) {windoww.focus()}

return false;

}

 

Says "invalid argument" in:

 

windoww = window.open(url,title,windowoptions);

 

Thanks for the help!

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.