Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-26-2011, 02:57 PM   PM User | #1
ambs
New Coder

 
Join Date: Mar 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
ambs is an unknown quantity at this point
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!
ambs is offline   Reply With Quote
Old 08-26-2011, 03:04 PM   PM User | #2
ambs
New Coder

 
Join Date: Mar 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
ambs is an unknown quantity at this point
I could also add images of what IE is doing if that helps?
ambs is offline   Reply With Quote
Old 08-26-2011, 05:49 PM   PM User | #3
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,498
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
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.
sunfighter is offline   Reply With Quote
Old 08-26-2011, 10:22 PM   PM User | #4
tweezy
New Coder

 
Join Date: Aug 2011
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
tweezy is an unknown quantity at this point
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.
tweezy is offline   Reply With Quote
Old 08-30-2011, 02:39 PM   PM User | #5
ambs
New Coder

 
Join Date: Mar 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
ambs is an unknown quantity at this point
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.
ambs is offline   Reply With Quote
Old 08-30-2011, 04:22 PM   PM User | #6
ambs
New Coder

 
Join Date: Mar 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
ambs is an unknown quantity at this point
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 04:33 PM.. Reason: ...
ambs is offline   Reply With Quote
Old 08-30-2011, 05:44 PM   PM User | #7
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,498
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
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.
sunfighter is offline   Reply With Quote
Old 08-30-2011, 08:51 PM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,055 Times in 4,024 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
ambs (08-31-2011)
Old 08-31-2011, 10:06 AM   PM User | #9
ambs
New Coder

 
Join Date: Mar 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
ambs is an unknown quantity at this point
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!
ambs is offline   Reply With Quote
Old 08-31-2011, 10:37 AM   PM User | #10
ambs
New Coder

 
Join Date: Mar 2011
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
ambs is an unknown quantity at this point
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 11:58 AM..
ambs is offline   Reply With Quote
Reply

Bookmarks

Tags
internet explorer, javascript, menus

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:24 AM.


Advertisement
Log in to turn off these ads.