Javascript issue FIREFOX!!

Discussion in 'JavaScript' started by Dangy, Dec 23, 2009.

  1. #1
    <script type="text/javascript">
                                  window.onload = function() {    
                                  setTimeout(loadfunction,5000) 
                                  } 
                                  function loadfunction() {   
                                  document.getElementById("myiframe").src = "include/view_tracker.php" 
                                  
                                  } 
                                  </script>
    Code (markup):
    Why doesnt this code work in firefox. Please provide me a work fix.. Work in All browser or the major ones.
     
    Dangy, Dec 23, 2009 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    You must have the main tags in your code. These tags are:

    <html></html>
    <head></head>
    <body></body>
     
    s_ruben, Dec 23, 2009 IP
  3. shakemelikeapig

    shakemelikeapig Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try this:

    window.frames["myiframe"].src = "include/view_tracker.php";
    Code (markup):
    Different properties are available on iframes depending on how you access them. Not sure why, IE has a few iframe oddities as well.
     
    shakemelikeapig, Dec 24, 2009 IP
  4. Dangy

    Dangy Well-Known Member

    Messages:
    841
    Likes Received:
    25
    Best Answers:
    2
    Trophy Points:
    155
    #4
    Issue fixed myself, was just a Php bug for Firefox that was all. It was in a html tag body basis, I have 10+ years with html/css.
     
    Dangy, Dec 24, 2009 IP