By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

Help why JS doesn't work in IE6 but works in other browsers...

P: n/a
I have this JS to scroll two frames with on scrollbar:

<html>
<head>
<script>
var tid;
function initScrollSynchronization () {
tid = setInterval('syncFrame()', 25);
}
function syncFrame () {
if (document.all && !window.opera) {
var scrollTop = frame0.document.body.scrollTop;
var scrollLeft = frame0.document.body.scrollLeft;
}
else {
var scrollTop = frame0.pageYOffset;
var scrollLeft = frame0.pageXOffset;
}
frame1.scrollTo (scrollLeft, scrollTop);
}
</script>
</head>
<frameset rows="*" cols="162,*" framespacing="0" frameborder="NO"
border="0" ONLOAD="initScrollSynchronization()">
<frame src="navbar.htm" name="frame1" scrolling="no">
<frame src="main.htm" name="frame0">
</frameset>

This works in NN7, Mozilla but not IE6. Any ideas?
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Big D wrote:
I have this JS to scroll two frames with on scrollbar:

<html>
<head>
<script>
var tid;
function initScrollSynchronization () {
tid = setInterval('syncFrame()', 25);
}
function syncFrame () {
if (document.all && !window.opera) {
var scrollTop = frame0.document.body.scrollTop;
var scrollLeft = frame0.document.body.scrollLeft;
}
else {
var scrollTop = frame0.pageYOffset;
var scrollLeft = frame0.pageXOffset;
}
frame1.scrollTo (scrollLeft, scrollTop);
}
</script>
</head>
<frameset rows="*" cols="162,*" framespacing="0" frameborder="NO"
border="0" ONLOAD="initScrollSynchronization()">
<frame src="navbar.htm" name="frame1" scrolling="no">
<frame src="main.htm" name="frame0">
</frameset>

This works in NN7, Mozilla but not IE6. Any ideas?


Have a look at this approach:

http://www.a1javascripts.com/page_ef...escroller.html

Jul 20 '05 #2

P: n/a
Big D wrote:
I have this JS to scroll two frames with on scrollbar:

<html>
<head>
<script>
var tid;
function initScrollSynchronization () {
tid = setInterval('syncFrame()', 25);
}
function syncFrame () {
if (document.all && !window.opera) {
var scrollTop = frame0.document.body.scrollTop;
var scrollLeft = frame0.document.body.scrollLeft;
}
else {
var scrollTop = frame0.pageYOffset;
var scrollLeft = frame0.pageXOffset;
}
frame1.scrollTo (scrollLeft, scrollTop);
}
</script>
</head>
<frameset rows="*" cols="162,*" framespacing="0" frameborder="NO"
border="0" ONLOAD="initScrollSynchronization()">
<frame src="navbar.htm" name="frame1" scrolling="no">
<frame src="main.htm" name="frame0">
</frameset>

This works in NN7, Mozilla but not IE6. Any ideas?


One More:

http://www.webreference.com/dhtml/column17/allCode.html

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.