SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE9 Developer Tools - Is it Magic?

    I'm using IE9. I go to my webpage that I have a youtube jquery plugin installed and am using to load youtube videos into a player.

    The bizarre thing that i am encountering is when i open the browser (IE9), the player doesnt work, meaning when i click a thumbnail it doesnt load and play the player like all of the browsers do.

    The tricky thing I'm seeing is that when i open IE9 and then open the developer tools by pressing F12, magically everything begins to work.

    My questions is what exactly happens you open the developer tools in IE9? How does it change the browser and how can i force this change on page load?
    MYCFMX (Under Construction)
    http://www.mycfmx.com/

    More from me - coming soon

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,825
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Is the web page a file on your computer or is it on the web?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is on the web and this only happens in IE.

    The plugin i am using is: jQuery YouTube TubePlayer Plugin - By Nirvana Tikku

    Stangely, i don't see the same issue on his website, but i am using in a bit of a different way. Something is block my onClicks perhaps.

    One thing i'll try is moving his commands from onclick to the href.
    MYCFMX (Under Construction)
    http://www.mycfmx.com/

    More from me - coming soon

  4. #4
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Has the javascript got console.log() in it? This causes the javascript to not work unless your console is open!

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no way, r u serious?
    MYCFMX (Under Construction)
    http://www.mycfmx.com/

    More from me - coming soon

  6. #6
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    omg!!! i have been pulling my hair over this issue -- that is sooooo freakin whack! But thank you for pointing it out to me. removing the console.log lines in it makes it magically work.
    MYCFMX (Under Construction)
    http://www.mycfmx.com/

    More from me - coming soon

  7. #7
    SitePoint Addict skunkbad's Avatar
    Join Date
    Apr 2008
    Location
    Temecula, CA
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is good to know! It's never happened to me, but it could save me a lot of time trying to debug.

  8. #8
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The reason for this is that the 'console' object is not set when the console is not open yet, so it will fail on calling a method on an object that is 'undefined'

  9. #9
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of deleting all "console.log", it could be an option to add a simple "if", so that it doesn´t break explorer but still works in FF.

    Code javascript:
    if (window.console) {
        console.log('message');
    }

  10. #10
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Microsoft would fix it in future versions of IE. Of course the IF statement is a nice workaround. Thanks for that!
    MYCFMX (Under Construction)
    http://www.mycfmx.com/

    More from me - coming soon


Tags for this Thread

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
  •