[Javascript] Object Expected Error

Namita J. Goel namita_jayaram at yahoo.com
Mon Jun 2 01:48:18 CDT 2003


Hello,

I am receiving the following error in IE the second I
move my mouse on the page:

"A runtime error has occurred. Do you wish to debug?
Line: 164
Error: Object expected"

Below is a copy of the JavaScript file. I have tried
desperately to figure this out and can't. Any help
will be appreciated!

JAVASCRIPT FILE:
----------------

//DROP-DOWN MENU

ns=window.navigator.appName == "Netscape"
ie=window.navigator.appName == "Microsoft Internet
Explorer"

function dropLinks(x) {
if(ns) {
   showbox= document.layers[x+1]
     showbox.visibility = "show";
       showbox.top=132;
       
    var items = 5      ;
     for (i=1; i<=items; i++) {
      elopen=document.layers[i]
        if (i != (x + 1)) { 
          elopen.visibility = "hide" }
            }
  }    

if(ie) {
   curEl = event.toElement
   curEl.style.background = "#FFFFFF
url(../Graphics/arrowgreen.gif) right no-repeat"	  

   showBox = document.all.box[x];
     showBox.style.visibility = "visible";
        showBox.style.top = 132;
         
   var items = 5 
    for (i=0; i<items; i++) {
      elOpen=document.all.box[i]
       barEl=document.all.mnubar[i]
        if (i != x){ 
          elOpen.style.visibility = "hidden" 
          barEl.style.background = "#EFD35A"
       }
     }
   }
}

function closeLinks() {
   var items = 5 
     for (i=0; i<items; i++) {
       if(ie){
        document.all.box[i].style.visibility =
"hidden"
          barEl=document.all.mnubar[i]
           barEl.style.background = "#EFD35A" 

       }
       if(ns){ document.layers[i+1].visibility =
"hide"}          
}
}


//LEFT SIDE MENU NAVIGATION

var Open = ""
var Closed = ""

function whenLoad(){
if(document.images){
	Open = new Image(16,13)    
	Closed = new Image(16,13)
	Open.src = "../Graphics/open.gif"
	Closed.src = "../Graphics/closed.gif"
}}

function clickMenu(what,what2){
if (what.style.display=='none'){
what.style.display='';
what2.src=Open.src
}
else{
what.style.display='none'
what2.src=Closed.src
}
}


//IMAGE ROLLOVERS

if (document.images) {
form = new Image()
email = new Image()
yellowform = new Image()
yellowemail = new Image()

form.src = '../Graphics/form.gif'
email.src = '../Graphics/email.gif'
yellowform.src = '../Graphics/yellowform.gif'
yellowemail.src = '../Graphics/yellowemail.gif'
}

else {
form = ""
email = ""
yellowform = ""
yellowemail = ""
}

function highlightOff(num) {
	if (num == "1") {document.images[1].src = form.src}
	if (num == "2") {document.images[2].src = email.src}
	}

function highlightOn(num) {
	if (num == "1") {document.images[1].src =
yellowform.src}
	if (num == "2") {document.images[2].src =
yellowemail.src}
}


//POP-UP WINDOWS

function showDiagram(whichDiagram) {
	diagramWindow = window.open(whichDiagram,
'diagramPage', 'width=780, height=520 scrollbars=yes
resizable=yes')
}



__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


More information about the Javascript mailing list