SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard subnet_rx's Avatar
    Join Date
    Aug 2001
    Location
    Hattiesburg, MS
    Posts
    1,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Troubleshooting Javascript in IE?

    I'm having a problem with some javascript code in IE. In IE 7, it only happens when I refresh the page. It happens on page load in IE 6. Looks fine in FF and Safari. How do I figure out why this is happening?

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DebugBar is something to consider in IE...
    http://www.debugbar.com/?langage=en
    FOR SALE: 1 set of morals, never used, will sell cheap

  3. #3
    SitePoint Wizard subnet_rx's Avatar
    Join Date
    Aug 2001
    Location
    Hattiesburg, MS
    Posts
    1,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that link. Unfortunately, it never detects the javascript. It just displays document downloading the entire time. Other pages show up fine in the debugbar. Is it possible that IE isn't even reading my code? Here's the two lines that cause it to load

    Code:
    <script src="/blogs/js/prototype.js"></script>
    <script src="/blogs/js/modal.js"></script>

  4. #4
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try adding the type and the language attribute:
    Code:
    <script language="javascript" type="text/javascript" src="myJS.js"></script>
    FOR SALE: 1 set of morals, never used, will sell cheap

  5. #5
    SitePoint Wizard subnet_rx's Avatar
    Join Date
    Aug 2001
    Location
    Hattiesburg, MS
    Posts
    1,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, after I submitted that post, I decided to validate the page before going any further. I did the above among several other corrections. Still no go. The debugbar works on the page now too, but doesn't show any errors. I'm still unsure how I can figure out what's going wrong on IE that's not on several other browsers.


Bookmarks

Posting Permissions

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