IE5 Fix

The Following Works In IE4 And NS4,
But Not IE5. Please Help Me Fix It.

<HTML><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no=cache">
</HEAD>
<FRAMESET ROWS="*,0" border=0>
   <FRAME border=0 SRC="blank.htm" NAME="main">
   <FRAME border=0 SRC="js.htm" NAME="hidden">
</FRAMESET>
</FRAMESET>
</HTML>

js.htm:
<HTML><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no=cache"></HEAD>
<script>
i=0;
if (navigator.appName == "Netscape") {nav = "NS"} else{nav = "IE";}
function on_load() {
self.parent.main.document.close();
self.parent.main.document.open();
self.parent.main.document.write("<html><body bgcolor='#906000'>");
writer();
}

function writer() {
self.parent.main.document.write("<a name='" + i + "'>" + i + "</a><br>");
if (nav == "NS"){self.parent.main.scrollTo(self.parent.main.document.anchors[i].x,self.parent.main.document.anchors[i].y);}
else {self.parent.main.document.anchors[i].focus();}
i++;
setTimeout("writer();", 1000);
}
</script>
<body onLoad="on_load(0)"></body></html>


rejsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xavCommented:
It seems to work fine for me in IE5.  It loads the 2 frames, and writes 1,2,3, and so on (in anchors) in the main frame every second.  Is that what it's supposed to do?  What error (if any) are you getting?
0
Michel PlungjanIT ExpertCommented:
You migth want to use
self.parent.main.document.anchors[i].scrollIntoView();

instead of focus()

Michel
0
rejsAuthor Commented:
Sorry xav,
Its Supposed To Scroll To The Botton Each Time.

mplungjan,
Your Andswer Worked For IE5
If You Have IE4 Runable Seperate From IE5, Please Check It For Me.
Submit Your Results As The Answer.
Easy 500 :)
rejs
0
Michel PlungjanIT ExpertCommented:
Thanks ;-)

self.parent.main.document.anchors[i].scrollIntoView();

will work in IE4+

Michel
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.