Please may you help me in the following problem?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Please may you help me in the following problem?

Post by fastfingertips »

Please may you help me in the following problem?

I have a frameset with 2 frames, in the first one is loading a page from my site, in the second it would be loaded different other pages from different websites (I will not have any control on their content).
I would like to know if is there any possibility to test if the page from the second frame has been loaded.

Thank you
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Don't double post man, if nobody answers, nobody knows.

viewtopic.php?t=16254
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

Hm in this post i have explained better what i need :P
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

You could have edited the old post and added a reply with something like "No one knows?"
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

Sorry for that, but as you see i'm new to this forum, also in general i'm not a member to many forums, with this i'm member at three forums so i'm a rookie.

Now because i find out how i must do i will not repeat the mistake but also i know that i did not deserve this:
Don't double post man, if nobody answers, nobody knows.
Where is your patience for rookies? :(
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

he wasn't having a go at you.

As a noob, you are encouraged to read the posting guidelines (viewtopic.php?t=8815), which you must not have done if you made this mistake.

We all make mistakes, just learn from them and progress and we can all be one happy family *Group Hug* :)

As to your problem, i am not sure.

Mark
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

I guess you could try putting an onload handler on the frame... but to be honest I'm not sure if this would work.

Code: Select all

<head>
<script type="text/javascript">
function FireFunction()
&#123;
alert("page loaded");
&#125;
</script>
</head>

<frameset cols="100,*" blabalbalba>
<frame href="pageOne.htm" />
<frame href="pageTwo.htm" onload="FireFunction()" />
</frameset>
I can't think of anything else at the moment. If you have no control over the page you are loading (ie it's not yours) then there's not much you can do.


On other note if the pages are not your own (or your friends) then be careful of any copyright on the pages you are loading ;)
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

Sir the onload() isn't when the page starts to load?
I woud like to test if the page has been loaded 100%. Also i do not have any control on that page (it has been loaded from another source then my site)
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

fastfingertips wrote:Sir the onload() isn't when the page starts to load?
I woud like to test if the page has been loaded 100%. Also i do not have any control on that page (it has been loaded from another source then my site)
The onload() event is fired when the page has loaded with the exception of any images/flash movies etc.

If you want to test for when the page has finished downloading everything it needs to then you are going to need to use some heavy JavaScript code. For example you will need to run a loop to check if the <body> of the page is available for JS to access, you will need to build a list of all images on that page, attach an onload event to each of the images, and then run another loop/check to test for when all of the images have loaded up. I would do it for you but it's not something I would do for free.

It's not impossible to do it yourself but you will need to have good knowledge of JavaScript, and you also need to use different versions of the code depending on which browser is being used.


Why do you need to check if the page has loaded anyway?
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

Once the page has been loaded user must perform an action into that page, after that I must check again if the page has been loaded again (after the action).
Because is loading an external page I cannot check the URL, nothing so my only way is to take completed action and as I see only the onload() allows me to do that.

I’m not interested by images.
Post Reply