473,569 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript & Netscape

I have a scrollbar that runs at the top of my page, I have it in a external
js file and call it in the head tags of the webpage code. can you one tell
me how to get this code to work with other browsers mainly Netscape 7 and
above. Currently it doesn't display.

this is the scroll bar code

Thanks

----------------------------------------------------------------------
document.write( '<marquee id="alertit"
style="position :absolute;left: 0px;top:0;backg round-color:"
onMouseover="th is.scrollAmount =1"
onMouseout="thi s.scrollAmount= speed"></marquee>');

var themsg='<span style="font: 22px Arial;color:#FF CC66;"><b>Text Text
Text:</span>'
var speed=4
var loops=4

function populatescrolle r(){
var windowwidth=iec ompattest().cli entWidth
document.getEle mentById("alert it").innerHTML= themsg
document.getEle mentById("alert it").style.widt h=windowwidth
document.getEle mentById("alert it").scrollAmou nt=speed
document.getEle mentById("alert it").scrollDela y=20
document.getEle mentById("alert it").loop=loo ps
document.getEle mentById("alert it").onfinish=f unction(){
document.getEle mentById("alert it").style.visi bility="hidden"
}
}

function iecompattest(){
return (document.compa tMode!="BackCom pat")? document.docume ntElement :
document.body
}

if (document.all && document.getEle mentById){
window.onload=p opulatescroller
window.onresize =populatescroll er
}
----------------------------------------------------------------------
Jul 23 '05 #1
2 2164
Adam wrote:
I have a scrollbar that runs at the top of my page, I have it in a external
js file and call it in the head tags of the webpage code. can you one tell
me how to get this code to work with other browsers mainly Netscape 7 and
above. Currently it doesn't display.

this is the scroll bar code

Thanks

----------------------------------------------------------------------
document.write( '<marquee id="alertit"
style="position :absolute;left: 0px;top:0;backg round-color:"
onMouseover="th is.scrollAmount =1"
onMouseout="thi s.scrollAmount= speed"></marquee>'); background-color ?
var themsg='<span style="font: 22px Arial;color:#FF CC66;"><b>Text Text
Text:</span>' var themsg='<span style="font: 22px Arial;color:#FF CC66;font-weight:bold">Te xt Text Text:</span>'; var speed=4 var speed=4; var loops=4 var loops=4;
function populatescrolle r(){
var windowwidth=iec ompattest().cli entWidth var windowwidth=iec ompattest().cli entWidth; document.getEle mentById("alert it").innerHTML= themsg document.getEle mentById("alert it").innerHTML= themsg; document.getEle mentById("alert it").style.widt h=windowwidth document.getEle mentById("alert it").style.widt h=windowwidth + 'px'; document.getEle mentById("alert it").scrollAmou nt=speed document.getEle mentById("alert it").scrollAmou nt=speed; document.getEle mentById("alert it").scrollDela y=20 document.getEle mentById("alert it").scrollDela y=20; document.getEle mentById("alert it").loop=loo ps document.getEle mentById("alert it").loop=loops ; document.getEle mentById("alert it").onfinish=f unction(){
document.getEle mentById("alert it").style.visi bility="hidden"
} This is an unknown, or at least proprietary event and does not work in IE 6 SP1 and Moz. 1.7
http://groups.google.d e/groups?q=onfini sh+group:comp.l ang.javascript& hl=de&lr=lang_d e|lang_en&ie=UT F-8&group=comp.la ng.javascript&s elm=LQQk4.855%2 4hT2.11777%40ne ws1.rdc1.ct.hom e.com&rnum=4 }

function iecompattest(){
return (document.compa tMode!="BackCom pat")? document.docume ntElement :
document.body
}
The next I changed to a function, which is called by <body onload="setupMa rquee();">
if (document.all && document.getEle mentById){
only IE and Opera know the proprietary document.all
so e.g. Mozilla and Netscape don't come here
window.onload=p opulatescroller
window.onresize =populatescroll er
}


function setupMarquee() {
if (document.all || document.getEle mentById){
window.onresize =populatescroll er;
populatescrolle r();
} else {
alert('Browser !=IE Browser != Opera');
}
}

After correcting some mistakes this code is working in IE 6.0 SP1 and Mozilla 1,7, hopefully in Opera too.
But I would apologize to implement your 'scrollbar' with DHTML without the proprietary '<marquee>', or even better
with one of the free Java-applets.

cu, Michael
Jul 23 '05 #2
Adam wrote:
I have a scrollbar that runs at the top of my page, [...]


You do not have a scrollbar (that is the GUI element to scroll the
document), you have horizontally scrolling text. For usabilities
sake, remove it. (Ask Google for details about "marquee".)
PointedEars
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2291
by: Smriti Dev | last post by:
Hi, I have a drop down menu with a listing of communities and I use it to select a community, selecting a letter ie. "T" , I get bumped to the "T" section to choose communities that start with a "T". I need to get the "T" communities to start at the top of the community list in the drop-down box. Right now the communities starting with...
5
1755
by: Florian Proch | last post by:
Hi all... i'm currently working for a big project to construct a website. We need to support some browser and OS : IE 5.0 -> IE 6, Mozilla 1.2 -> 1.7, Opera 5 -> Opéra 7.5x, Netscape 4.75 -> NS 7.2, Safari and for OS : Win95/98/NT/Me/2000/XP, MacOS 9/10, Linux. I have some problems with browser on different OS. For example i have write a...
2
1493
by: Jamiil | last post by:
This is the first time I am ever using JavaScript, I am not even eloquent in HTML, and all I am is someone who has Microsoft/Netscape Webpage developers. What I am trying to say is that I am not an expert in any of these webpage developing languages. Now, having said that, here is my problem. I got this program from the book JavaScript "The...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7681
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.