The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 01:55:09 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: .complete  (Read 2955 times)
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« on: September 22, 2008, 02:24:32 PM »

FF 1,2 and 3 support it as do WebKit based browsers but IE doesn't.

Do you know a work around?

Thanks

Far too rarely visiting, Jason Smiley
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: September 22, 2008, 06:09:07 PM »

Do you need to know when a page has been completely parsed? If you put a tiny javascript at the very end of the page that sets a global variable, and set an interval at the top watching for that variable, then you'd know when the whole thing's been parsed. If you're wanting to know when everything has been downloaded (ie graphics and all) then it's quite a bit tougher. If it is *vital* to know, then you could replace images with source called via javascript, where you *can* get a completed notification when graphics have been loaded.

Another thing in IE is that nothing shows up on the DOM until *after* the whole page has been parsed and processed, so you could set an interval watching for an element on the DOM at the very bottom of the page (say, an invisible DIV id="waitForMe" or something) - when you see that element exist, then the page has been processed. BEAR IN MIND that FF, Safari, any WebKit browser will see that node on the DOM immediately after it's placement in the HTML script - only IE will make you wait for it.

Hope this bumps you in the right direction. I've had to do some similar things, perhaps if you could outline a little more of what you are working on I can assist.

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #2 on: September 22, 2008, 07:12:19 PM »

i also have done similar things. And I didnt know about .complete. lol

I did the image loader thingy. every required image on the page was retrieved via a serverside code page, and a counter would update. when the count had been met, i then initiated the next step which was to accept an ajax call and process the next stuff.

the thing i never tried, but thought of after the fact, was to src="javascriptfunction". then you could keep all the interaction client side.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« Reply #3 on: September 24, 2008, 03:30:38 AM »

Thank you gents.

I have solved it using a timer - It's ugly and horrible but it is also "good enough" so that will do for now Smiley
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: September 24, 2008, 08:04:40 AM »

... and you SHOULD stick around more ya bastard... we all miss your brains and tricks.

Will we be seeing you in Ireland?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!