Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnMouseOut change color based on URL 1

Status
Not open for further replies.

evaleah

Programmer
Joined
Mar 18, 2003
Messages
252
Location
US
I have put the following in my onmouseout event of a tablecell. Can anyone tell me what is wrong with it? I keep getting "Object doesn't support this property or method" and it looks good to me!

"javascript:var strHref=window.location.href; if (strHref.indexof('Tab1')!=-1){this.className='selected';} else {this.className='default';}"

Thank you!!!

Eva
 
javascript is case sensitive:
Code:
javascript:var strHref=window.location.href; if (strHref.index[!]O[/!]f('Tab1')!=-1){this.className='selected';} else {this.className='default';}

-kaht

Looking for a puppy?

[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
 
Thank you!!!!

I knew it had to be something really simple that I was just not seeing. Sometimes one just needs an extra set of eyes. No matter how I looked at that I had kept seeing the O capitalized. I had actually reset the caps on my className a million times :-)

Eva
 
No problem, glad you got it working. I love those "easy fixes"

-kaht

Looking for a puppy?

[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top