Web Analytics Made Easy -
StatCounter onreadystatechange - CodingForum

Announcement

Collapse
No announcement yet.

onreadystatechange

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • onreadystatechange

    Hi. I've created a google like search over my web site. Been trying to improve this search and need some help.

    This is what I do. From one frame, I'll load another frame with either a text or html file. Once loaded, I perform a text search. If found, I'll scroll the text into view.

    Got this to work in IE using parent.frames[1].document.readyState == "complete" in a setTimeout loop. I realize it's inefficient. I'ved tried parent.frames[1].document.onreadystatechange = "alert('fire')", but doesn't seem to fire. Does anyone have a working example of onreadystatechange?

  • #2
    Code:
    parent.frames[1].document.onreadystatechange=tmp;
    function tmp() {
    alert(var rs=parent.frames[1].document.readyState);
    
    if(rs==4) {
    //statements to execute when loaded
    }
    }
    Hope that helps!

    Happy coding!

    Comment


    • #3
      Originally posted by nolachrymose
      Code:
      parent.frames[1].document.onreadystatechange=tmp;
      function tmp() {
      alert(var rs=parent.frames[1].document.readyState);
      
      if(rs==4) {
      //statements to execute when loaded
      }
      }
      Hope that helps!

      Happy coding!
      I've tried it with my IE 5.5. Doesn't seem to want to fire. What am I doing wrong? Do you know of any web site with a working example of onreadystatechange?

      Comment

      Working...
      X