Forum Moderators: open
Here is the code:
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5¦¦ns6¦¦opera
That is what makes it work in other browsers I assume, and I just need to know the one for Mozilla. If you want the whole script I can reply with that if you need.
Thank you,
Kaz
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5¦¦ns6¦¦opera
document.all only applies to IE browsers. Your match only "matches" Opera. NS is officially a defunct browser.
Try something like
var browserok=false;
if (document.getElementById) { browserok=true; }
else { alert('Your browser is not supported'); }
... 0r some other action in the else. Or eliminate the else and do nothing.
Then throughout your script, just take actions on document.getElementById.
I've looked at some scripts, but a lot of them use images. I want to just use the text '*' in different sizes, fonts and colours. I have found a few that are like that but still do not work when I have inserted the script and uploaded.
HOWEVER, when I look at this site as a tutorial (http://rainbow.arch.scriptmania.com/scripts/bg/snow_fall_1.html), it works in Mozilla Firefox? But when I put it on my site, it won't do anything. Any further suggestions?
[edited by: sieGe at 1:32 am (utc) on Oct. 30, 2008]