Iframes and delays

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
HI I am looking for a java script that would allow me to load two iframes in such a way that the second one should load 5 secs after the first one.
Can anyone help?
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
There are a few ways to do this. The easiest would probably be:

HTML:
<iframe src="http://www.google.com" onload="setTimeout('document.getElementById(\'frame2\').src=\'http://en.wikipedia.org\'', 5000);"></iframe>
<iframe src="" id="frame2"></iframe>
This would load google in the first iframe, and then wikipedia in the second one 5 seconds after google is done loading.
 
Top