[SOLVED] - How to get Javascript run in FireFox ?
Moderator: General Moderators
Okay.....Now I've loaded FireFox (since its mozilla's product anyway). Yes I was testing ONLY in IE all this time (and even worse only ver 6). Only when my ex-classmate told me about FireFox did I come to realize all this. I dont understand - All this time I was refering to Netscape's Java Central for javascript since they are the inventors of it so I figured there wouldn't be problems in other browsers supporting JS.
Now where am I supposed to get started regarding the actual JS implementation ? Im afraid if FireFox will secretly load other stuff in the background (like Kazaa) for updates or whatever. Many OSS do that.
Thanks for enlightening me on this subject.
Now where am I supposed to get started regarding the actual JS implementation ? Im afraid if FireFox will secretly load other stuff in the background (like Kazaa) for updates or whatever. Many OSS do that.
Thanks for enlightening me on this subject.
I've loaded FireFox and obviously my JS are not working. I was looking for some good examples for writing standard JS code and I clicked FireFox Help which has many JS functions working in the browser. I wanted to view the JS files stored in the hard disk but could not find them in Temporary Internet Files. Where does FireFox cache ?
Yes I did install the develoer tool as well.
I've to get used to it. All this time I was using VS.NET and still use it since its so common.
Does anyone know whats the actual name for event ?
I keep getting event undefined in FireFox.
Originally it was event. Now I tried Event, window.event etc but no luck
I've to get used to it. All this time I was using VS.NET and still use it since its so common.
Does anyone know whats the actual name for event ?
I keep getting event undefined in FireFox.
Originally it was event. Now I tried Event, window.event etc but no luck
Yes. See the output of http://www.vlbjcas.com in IE6. The same wont work in FireFox. Thats what Im trying to do. In the JS file I have :
FireFox keeps showing event undefined in all lines. I've looked up Netscape's Javascript central too but could not find what Im suppossed to be looking for
Code: Select all
function MainMenuEvent(srcId,event)
{
switch (event.type)
{
case "mouseover":
srcId.style.color="#006600";
srcId.style.backgroundColor="#99cc00";
break;
case "mouseout":
srcId.style.color="#99cc00";
srcId.style.backgroundColor="#006600";
break;
}
}Code: Select all
if (document.images)
{
// nav menu
img1on = new Image(); img1on.src = "images/btn_1_over.gif";
img2on = new Image(); img2on.src = "images/btn_2_over.gif";
img3on = new Image(); img3on.src = "images/btn_3_over.gif";
img1off = new Image(); img1off.src = "images/btn_1.gif";
img2off = new Image(); img2off.src = "images/btn_2.gif";
img3off = new Image(); img3off.src = "images/btn_3.gif";
}
function act(imgName) {
if (document.images) {
documentїimgName].src = eval(imgName + 'on.src');
}
}
function inact(imgName) {
if (document.images) {
documentїimgName].src = eval(imgName + 'off.src');
}
}Code: Select all
<a href="some_page.php" onmouseover="act('img1')" onmouseout="inact('img1')"><img src="images/btn_1.gif" alt="some_image" border="0" name="img1" /></a>PS : note that I assigned the name on each img. So it load the right "over"
EDIT : typo
Wait a second. I did not check your code yet. But first I want to know is that why has this nothing do with the event object. All I need to change in my script is the way event handles. Once the event thing works I'll have rest of the code as usual. Im sure FireFox has event object defined. Its mentioned in w3c.
I've already used styles in most of my scripts. I just need to keep changing their values. Its much easier. Lets say my rollovers doesn't require images. Just style colours,underlines,textedcorations etc etc.
I've already used styles in most of my scripts. I just need to keep changing their values. Its much easier. Lets say my rollovers doesn't require images. Just style colours,underlines,textedcorations etc etc.
If it's only roll on underline and stuff CSS is your buddy (ps :I'm at work so I didn't test anything from your site)
So I'm just giving youthe way I used to make rollovers (wich work cross browser)
Maybe I'm not helping you at all..
sorry if it's the case
Ps : here an exemple of css rolls here
So I'm just giving youthe way I used to make rollovers (wich work cross browser)
Maybe I'm not helping you at all..
sorry if it's the case
Ps : here an exemple of css rolls here
Finally all my questions are answered.
Must check out link : http://www.quirksmode.org
Can you believe it. This site it specially meant for IE6 incompatibility issues. Someone please include this in tutorial section or where ever required.
This is REALLY good.
Must check out link : http://www.quirksmode.org
Can you believe it. This site it specially meant for IE6 incompatibility issues. Someone please include this in tutorial section or where ever required.
This is REALLY good.