Forum Moderators: open
<html>
<head>
<title> LANTERN RIDGE - Homes for Sale </title>
<script language="Javascript">
function LoadIframe()
{
document.getElementById("iframe1").src="http://example.com/MichaelThomas";
setTimeout("LoadIframe2()",900);
}
function LoadIframe2()
{
document.getElementById("iframe2").src="http://example.com/property/proplist.asp?
VAR_SearchSource=propsearch&VAR_City=SCOTTDALE&PRM_PropertyTypeCode=&PRM_Minimum_Price=&PRM_Maximum_Price=&PRM_Minimum_baths=&PRM_Minimum_Be
ds=&PRM_Minimum_YearBuilt=&PRM_Custom14=&PRM_Minimum_Acreage=&PRM_Custom11=&PRM_County=&PRM_Address=lantern";
}
</script>
</head>
<body onload="LoadIframe()">
<iframe name=iframe1 frameBorder=0 width="100%" height="200"></iframe>
<iframe name=iframe2 onLoad="window.scrollTo(0,0); return false" src="http://www.example.com/Loading.htm" frameBorder=0 width="100%"
height="2500"></iframe>
</body>
</html>
[edited by: encyclo at 7:09 pm (utc) on May 18, 2007]
[edit reason] examplified, see terms of service [/edit]
Based on that, I've re-written your example. Note, I'm not sure whether or not the onload stuff will work for iframe2.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset:utf-8">
<title> LANTERN RIDGE - Homes for Sale </title>
<script type="text/javascript">
// Global variables
var iframe1, iframe2;
window.onload = function() {
iframe1 = document.getElementById("iframe1");
iframe2 = document.getElementById("iframe2");
iframe1.src="http://example.com/MichaelThomas";
setTimeout( function() {
iframe2.src = "http://example.com/property/proplist.asp?VAR_SearchSource=propsearch&VAR_City=SCOTTDALE&PRM_PropertyTypeCode=&PRM_Minimum_Price=&PRM_Maximum_Price=&PRM_Minimum_baths=&PRM_Minimum_Beds=&PRM_Minimum_YearBuilt=&PRM_Custom14=&PRM_Minimum_Acreage=&PRM_Custom11=&PRM_County=&PRM_Address=lantern";
iframe2.onload = function() {
iframe2.window.scrollTo(0,0);
};
}, 900 );
};
</script>
</head>
<body>
<iframe name="iframe1" id="iframe1" frameBorder="0" width="100%" height="200"></iframe>
<iframe name="iframe2" id="iframe2" frameBorder="0" width="100%" height="2500" src="http://example.com/Loading.htm"></iframe>
</body>
</html>