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 10 of 10
  1. #1
    New Coder
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Having problems with JavaScript in IE.

    I'm currently in the process of updating our old website as the layout is just terrible and it's hard to find products on it.

    This new layout has drop down menus, accordion menus and an image enlarger all from JavaScript. They work wonders in Firefox and Google chrome but, as usual, Internet Explorer has decided not to load it right for me. I've got several problems...

    Images won't show up most of the time
    Not able to click on linked images and the links from the drop down menu
    Accordion menu won't work, it just displays as one long sidebar
    When it does work, it shows a big gap between each main header rather than keeping them close together
    The drop list from the drop down menu hides behind the accordion menu

    Is there anything I can do that makes IE accept the javascripts?

    Unfortunately the new layout isn't up live so I've nothing you can link to. However, if there's any coding that you need I'll be more than happy to post it on. Thanks for your time!

  • #2
    New Coder
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I could also add images of what IE is doing if that helps?

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,712
    Thanks
    25
    Thanked 660 Times in 659 Posts
    Can't you make a test folder on your site and add the code to it? It's so much easier to TS something we can se.

  • #4
    New Coder
    Join Date
    Aug 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Good old Internet Exploder. I had issues like this when designing a site for a college project. I ended up getting a Browser Detection Script. If the user was using IE, it would switch stylesheets, vise versa if using Chrome, Safari or Firefox. Simple and worked a treat.

  • #5
    New Coder
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Sorry for my delayed response, I've not had time to come back onto here.
    @sunfighter, oh, I never thought thought of doing that. Of course, I'll put it up soon (hopefully!)

    @tweezy I've attempted using a different style sheet for IE, but even then I couldn't figure out why it wasn't liking the menus. I'm no expert coder whatsoever, I can do simple stuff as I've made a website before and purposely avoided JavaScript. But this new site I've no other option but to use it and I wish I hadn't started as it's really making my brain explode, lol.

  • #6
    New Coder
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay, I've uploaded a sample of the site onto a different directory.
    I've used a template for this, so the parts I've edited will be a mess. I completely understand that I fail at coding so please be harsh and let me know what I've done terrible wrong, thanks!

    http://daqua.co.uk/Testing/index.html

    Also, ignore the nav and background - still need to work on the images. :P

    And before I go, I've thrown in a quick example of the image enlarger in there.
    Any ideas where I've gone wrong? Thanks.
    Last edited by ambs; 08-30-2011 at 05:33 PM. Reason: ...

  • #7
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,712
    Thanks
    25
    Thanked 660 Times in 659 Posts
    I use IE8, I see no major difference in it and FF, chrome, or opera. Js works same in all browsers. Please explain what is the problem in the up loaded page.

  • #8
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,650
    Thanks
    80
    Thanked 4,638 Times in 4,600 Posts
    Yeah, it looks like crap in MSIE 7. The top menus pull down *behind* the side menu. And the side menu items are separated by a lot of space, vertically.

    But the JS code seems to work just fine.

    So I'd say it's all CSS issues.

    The way I approach this kind of thing: Rather than going into the CSS file and mucking around, I try adding style="..." to various things on the page. When I find the style change that makes it work, *then* I go change the CSS file to match and get rid of the style= stuff.

    So, for example, I might try adding style="z-index: 99;" to on of the drop down menus that is showing up behind the side menu, just for starters.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    ambs (08-31-2011)

  • #9
    New Coder
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thank you, I'll have a look through it and see what I can do.
    I really appreciate you two going through this with me, it's been driving me insane for weeks!

  • #10
    New Coder
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Ahh! I've found out why the top menu is pulling under the accordion menu, turns out that I had to have the position:auto changed to either relative, fixed or absolute. I've switched it to relative and it's no longer overlapping.

    Also, with the dreadful spacing between the accordion menu, I've taken out some of the margin and paddings and have inserted the height and that has sorted that problem also.

    I can finally move onto the rest of the site!! Thank you everyone!
    Last edited by ambs; 08-31-2011 at 12:58 PM.


  •  

    Tags for this Thread

    Posting Permissions

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