Hi
I have a script for a scrollbar that appears at the top of my webpage, I
want to be able to call the script from a central file so I can add the
scrollbar to all my pages and I will only have to edit the main file which
will change the text on all my pages Can anyone help???
this is script for the scrollbar
---------------------------------------------------------------------------
<marquee id="alertit"
style="position :absolute;left: 0px;top:0;backg round-color:"
onMouseover="th is.scrollAmount =1"
onMouseout="thi s.scrollAmount= speed"></marquee>
<script type="text/javascript">
var themsg='<span style="font: 22px
Arial;color:#FF CC66;"><b>Messa ges::::::::::: </b></span>'
var speed=4 //speed of scroller (1-10 or more)
var loops=4 //specify number of times message scrolls across screen (an
integer or "infinite")
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
}
</script>
----------------------------------------------------------------------------
--------------------------
I have a script for a scrollbar that appears at the top of my webpage, I
want to be able to call the script from a central file so I can add the
scrollbar to all my pages and I will only have to edit the main file which
will change the text on all my pages Can anyone help???
this is script for the scrollbar
---------------------------------------------------------------------------
<marquee id="alertit"
style="position :absolute;left: 0px;top:0;backg round-color:"
onMouseover="th is.scrollAmount =1"
onMouseout="thi s.scrollAmount= speed"></marquee>
<script type="text/javascript">
var themsg='<span style="font: 22px
Arial;color:#FF CC66;"><b>Messa ges::::::::::: </b></span>'
var speed=4 //speed of scroller (1-10 or more)
var loops=4 //specify number of times message scrolls across screen (an
integer or "infinite")
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
}
</script>
----------------------------------------------------------------------------
--------------------------
Comment