473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
2 1343

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Key Bohn | last post by:
var NN4 = document.layers? true : false; //Netscape Navigator 4.x. var IE4 = document.all? true : false; // IE version 4 and above. var agent = navigator.userAgent.toLowerCase(); function...
7
by: Trvl Orm | last post by:
I am working with 2 frames, Left and Right and the main code is in the left frame, which has been attached. Can someone please help me with this code. I am new to JavaScript and can't figure it...
22
by: Rich | last post by:
I am trying to create a site that will re-direct a user based on their OS. For this site I will need to send NT4 and 95 users to site A and 2000/XP users to site B. All others should be directed...
30
by: Torsten Oeltjen | last post by:
Does anybody know about problems with IE6 on XP SP2: textanchors in the same html-page have no function. Netscape, Opera and Firefox do not have any problem with them - only IE6 does not follow...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
4
by: Jed | last post by:
I have looked everywhere and cannot find a resolution for this. I have read several post on this forum that allude to similar issues but I have not found a solution. I am sending dynamic...
45
by: Pat | last post by:
its seems asp.net validation doesn't fire when using FireFox? Tested a page and it doesn't fire. It seems the javascript doesn't fire Any ideas?
2
by: Steve K | last post by:
I got a bit of a problem I like some help on. I'm designing an online training module for people that work in food processing plants. This is my target audience. These workers have little or no...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.