Hello friends!!
Please help me to remove this error from my webpage.
Actually i have downloaded a javascript scrolling images code from a website.
This code works fine when i used it alone in a webpage.
But when i insert this code in my webpage, it works fine , but shows "error on page" on status bar on window.
This error is only shown in Internet Explorer, not showwn in mozilla
etc.
you can find webpage at http://www.infopathankot.com/updates
if you will not see any error click on about us, queries, contact button etc.
you will find the error..
You can find javascript file at http://www.infopathankot.com/updates/hscroller.js

Please help its urgent

It's probably in your scrollHS4 function

function scrollHS4(){
   if(paused==1){return}
   clearTimeout(hs4Timer)

   scroll1Pos=parseInt(scroll1.style.left)

scroll1 was defined as a global in initHS4

function initHS4(){
   scroll1=document.getElementById("scroller1")

but I think IE doesn't recognize the global if it isn't declared outside of a function.

Try declaring scroll1 as a variable outside of initHS4

[CODE=javascript]
var scroll1=null;
function initHS4(){
   scroll1=document.getElementById("scroller1")

or, in scrollHS4, redefine the variable

function scrollHS4(){
   if(paused==1){return}
   clearTimeout(hs4Timer)

   scroll1=document.getElementById("scroller1")
   scroll1Pos=parseInt(scroll1.style.left)

I would go with option 2. Global variables are very sloppy.

This article has been dead for over six months. Start a new discussion instead.