Current location: Hot Scripts Forums » General Web Coding » JavaScript » Issues with Firefox


Issues with Firefox

Reply
  #1 (permalink)  
Old 04-26-05, 08:09 AM
BobEss BobEss is offline
New Member
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Issues with Firefox

Hi, I am a novice with javascript and was looking for some help. I found this script http://www.hotscripts.com/Detailed/45116.html and it won't seem to run in Firefox. It works on IE fine but when I check the console on Firefox it states: "$arr has no properties"

Here is the code:

Quote:
function ClassOver() {
if (!document.getElementById) return
var vOriginSrc;
var $arr = document.all;
for (var i = 0; i < $arr.length; i++) {
if ($arr[i].getAttribute('hcls')) {
$arr[i].onmouseover = function() {
vOriginSrc = this.className;
this.className=this.getAttribute('hcls');
}
$arr[i].onmouseout = function() {
this.className=vOriginSrc;
}
}
if ($arr[i].getAttribute('dcls')) {
$arr[i].onmousedown = function() {
this.className=this.getAttribute('dcls');
}
$arr[i].onmouseup = function() {
this.className=this.getAttribute('hcls');
}
}
}
}
onload=ClassOver;
Can anyone help me out with this?
Reply With Quote
  #2 (permalink)  
Old 05-03-05, 05:33 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
I don't think FireFox has the document.all collection, it's an Microsoft invention, and I heard it's on the way out...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox Addon - Taken Search soapbath General Advertisements 1 03-19-06 10:33 PM
program doesnt work in ie but does in firefox darkcarnival The Lounge 0 12-20-04 10:13 PM
IE and Firefox not working together stuboo CSS 2 11-29-04 02:49 AM
javascript, displays in firefox right but not IE eGGy JavaScript 1 08-09-04 06:05 AM
Firefox Bug ? zetop JavaScript 0 07-06-04 03:19 PM


All times are GMT -5. The time now is 10:47 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.