Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Each frame, redirecting

Each frame, redirecting

Scheduled Pinned Locked Moved Web Development
questiontutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Samsung
    wrote on last edited by
    #1

    1. If I load a web page that contains frames then the OnDocumentComplete() is hit for each frame. How can I recognize that the page is completely loaded (no more frames missing)? 2. How to recognize that web page is redirecting?

    J 1 Reply Last reply
    0
    • S Samsung

      1. If I load a web page that contains frames then the OnDocumentComplete() is hit for each frame. How can I recognize that the page is completely loaded (no more frames missing)? 2. How to recognize that web page is redirecting?

      J Offline
      J Offline
      JKroschel
      wrote on last edited by
      #2

      Here is a way I was able to get it to work. The concept is that there is one hidden frame which counts the number of other frames which have finished loading. In the example, there are two frames showing and one too small to see. index.html: left.html and right.html: function notifyParent(){ parent.hide.watch++ } hide.html //child_frames is the number of frames you need to load child_frames=2 watch=0 function watchChild(){ if(watch == child_frames){ alert('all child frames are up') }else{ setTimeout("watchChild()",3000) } } As the frames come up, they add one to the "watch" variable in the "hidden" frame. Once the watch variable equals the child_frames variable, it is considered finished. You can replace the alert with whatever you need. I don't know if this would work with iframes, if you are using those instead. It may require tweaking. Hope this helps!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups