Javascript not working in IE

  • ben_sigma
  • Beginner
  • Beginner
  • User avatar
  • Posts: 58
  • Loc: South Australia

Post 3+ Months Ago

Hi all,

I have just rebuilt my personal website, but have come across a major problem as i have not been testing it in IE till now. Silly me.

My javascript is all called from an external .js file and works in Firefox and Chrome. But not IE6 on my PC or IE7 on my friends.

Cannot figure out why. Any help is appreciated. Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ben_sigma
  • Beginner
  • Beginner
  • User avatar
  • Posts: 58
  • Loc: South Australia

Post 3+ Months Ago

Okay quick update,
Have discovered with testing Javascript is working in IE.

Used <body onLoad="speak()"> to test this. The speak function just alerted some text.

So it is working.

The things that are NOT working are
onMouseOver, onMouseOut, onClick etc of <div> and <img> tags.

Any help please,
thanks
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6243
  • Loc: Seattle, WA

Post 3+ Months Ago

Try making the event names all lowercase. I'm not sure if it will matter but technically the spec says they should be.
  • awatson
  • Novice
  • Novice
  • awatson
  • Posts: 20

Post 3+ Months Ago

Debugging javascript in IE can be a really pain - but the nice thing is that the new version of IE (IE8) has a *much* more useful javascript debugging environment - may be worth trying that out.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Our shop "develops specifically for IE" since we use activex here and there. I've acquired a few handy IE debugging tools over the days (sometimes, you just have to debug in IE over FF thanks to IE-specific bugs). Saying "well it worked in Firefox!" can get you some dirty looks around here. :)

Internet Explorer Developer Toolbar
Download IEDevToolBarSetup.msi from the link above and run it. If Internet Explorer is running when you install the toolbar, you may need to close and reopen the browser windows. In Internet Explorer 7, choose Tools → Toolbars → Explorer Bar → IE Developer Toolbar. The IE Developer Toolbar should open at the bottom of the browser window. You can add an icon to your toolbar to show/hide the IE Developer Toolbar. Right-click the toolbar and choose Customize Command Bar → Add or Remove Commands… Move the IE Developer Toolbar icon from the left list to the right list and click Close.
http://www.microsoft.com/downloads

IE Memory Leak Detector
JavaScript Memory Leak Detector (download) is a debugging tool to detect memory leaks in JavaScript code. It can be installed as an Internet Explorer band and it is expressly designed to find memory leaks in JavaScript code that runs in Internet Explorer. Follow the directions on the blog page for installation and use. The plug-in can kill your browser at times so plan on having a plain browser up and not having any tabs open with information that you plan on using right then. It will close your browser in a buggy way and is not predictable.
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

IEToys
Set of small tools (less than 300K) that provide some useful features–especially the ability to highlight a section of a webpage and view the source of just that section (similar to the “View Selection Source” option in Firefox).
http://www.bayden.com/ietoys/

View Rendered Source
This plug-in adds a new option called “View Rendered Source” to the context menu when you right-click a page in IE. On pages that change dynamically (using JavaScript to modify the DOM), you can view the page as it is currently rendered, rather than how the page was downloaded from the server, which is what the “View Source” option displays in Notepad.
http://billfriedrich.tripod.com/downloads/ViewRenderedSourceIE.zip

Enjoy! :) Any others who can maybe recommend a tool or two, feel free to pitch in!
  • Nightslyr
  • Proficient
  • Proficient
  • Nightslyr
  • Posts: 283

Post 3+ Months Ago

ben_sigma wrote:
Okay quick update,
Have discovered with testing Javascript is working in IE.

Used <body onLoad="speak()"> to test this. The speak function just alerted some text.

So it is working.

The things that are NOT working are
onMouseOver, onMouseOut, onClick etc of <div> and <img> tags.

Any help please,
thanks


Are you waiting for the document to load before attempting to attach events to elements?

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 67 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.