[SOLVED] - How to get Javascript run in FireFox ?

JavaScript and client side scripting.

Moderator: General Moderators

User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

[SOLVED] - How to get Javascript run in FireFox ?

Post by anjanesh »

I just tried my site on my friend's system and he has FireFox. The site is loading without the javascript working. I added the site in options and Enable Javascript and Enable Java are checked for the listed sites. Still its not parsing Javascript code.
Any Ideas ?
Thanks
Last edited by anjanesh on Sun Aug 08, 2004 2:15 pm, edited 1 time in total.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

FireFox bans certain javascripts from what I know including image->javascript integrations etc for security purposes.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

maybe he has an error in his javascript? check the javascript console..
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

The site is totally working and has been working in IE6 all this time.
Javascript error shows all possible errors in each line. I dont remember because there were many. I cannot paste now because Im not at my friend's place. Is FireFox widely used by people ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

IE/Firefox/Mozilla/Netscape are the top used browsers...
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

I dont understand how FireFox is used when it cant support javascript.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't have any problems with javascript in firefox.. I use javascript in projects all the time.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Alright. Can you just try out http://www.vlbjcas.com and see if the top menu changes its colors on moving the mouse around ? And click on one of the menu items and it must take you to the appropriate page.
Let me know if it is working.
Thanks feyd
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

tons of script errors:

error: event is not defined
location: http://www.vlbjcas.com/css/menu.js line 3
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Alright. Now view the same site in IE6 - my classmates have been using this for sometime now and IE6 has not reported any errors. When one my classmates told me that it wasnt working in FireFox I wanted to check it out.
You'll find it working in IE6. So what am I suppossed to do ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

rewrite it to figure out where to get the event data from.

the event models between IE and Mozilla variants are very very different.. it's probably a better idea to use an event handler, instead of a generalized handler..
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Holy Hell. Now I got to modify all my pages for various sites !!! Phew !
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

it's probably a better idea to use an event handler, instead of a generalized handler.

Just wanted to know whats event handler and generalized handler.
Is it the same as the one inserted by VS.NET ?

Code: Select all

<script id=clientEventHandlersJS language=javascript>
<!--
function id1_onclick() 
&#123;
&#125;
//-->
</script>
<td id="id1" language=javascript onclick="return id1_onclick()">
test
</td>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's one way of doing it.. the other way, that I personally do is set the global level event handler for each to my own function that handles the individual data.. that requires a LOT of extra code, but it's really cool to just add the graphics and rollovers automatically work :)
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

Hey, mhh just as an advice you should ALWAYS devlop on Mozilla. THEN fixing your website for IE. See mozilla follow the w3c rules. IE doesn't.
It'll be 100 times easier. Because all your errors even if IE doesn't take them in consideration are actual mistakes you made. Because you were prolly viewing in IE all the time.
Post Reply