Page 1 of 2

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

Posted: Sun Aug 08, 2004 3:48 am
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

Posted: Sun Aug 08, 2004 7:47 am
by Joe
FireFox bans certain javascripts from what I know including image->javascript integrations etc for security purposes.

Posted: Sun Aug 08, 2004 11:55 am
by feyd
maybe he has an error in his javascript? check the javascript console..

Posted: Sun Aug 08, 2004 12:19 pm
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 ?

Posted: Sun Aug 08, 2004 12:43 pm
by feyd
IE/Firefox/Mozilla/Netscape are the top used browsers...

Posted: Sun Aug 08, 2004 1:10 pm
by anjanesh
I dont understand how FireFox is used when it cant support javascript.

Posted: Sun Aug 08, 2004 1:11 pm
by feyd
I don't have any problems with javascript in firefox.. I use javascript in projects all the time.

Posted: Sun Aug 08, 2004 1:53 pm
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

Posted: Sun Aug 08, 2004 1:56 pm
by feyd
tons of script errors:

error: event is not defined
location: http://www.vlbjcas.com/css/menu.js line 3

Posted: Sun Aug 08, 2004 2:05 pm
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 ?

Posted: Sun Aug 08, 2004 2:09 pm
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..

Posted: Sun Aug 08, 2004 2:15 pm
by anjanesh
Holy Hell. Now I got to modify all my pages for various sites !!! Phew !

Posted: Mon Aug 09, 2004 12:00 am
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>

Posted: Mon Aug 09, 2004 12:02 am
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 :)

Posted: Mon Aug 09, 2004 8:46 am
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.