Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

MouseTraiL CLock won't show on my webpage


  • Please log in to reply

#16
ska

ska

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
I just downLoaded a trial version of CoffeeCup htmL editor. i then opened the mousetraiL1.html fiLe in it & it worked perfectLy. I then set it to preview in FireFox & got nothing - just Like before. So it worked in the htmL editor but not in my browser. I'm off to try your Last post bdlt AND try previewing the mouseclock1.html in ie from the CoffeeCup editor ...

i'm back with resuLts:
Previewed the mousetraiL1.htmL fiLe in Internet ExpLorer from the CoffeeCup htmL editor & it worked perfectLy - tried previewing in FireFox again (just to be sure) & stiLL NOTHING.
Opened the fiLe created with your Last post - jsversion.htm & this is what came up in my (FireFox) browser window:

[Javascript Version(s):
javascript1.1
javascript1.2
javascript1.3

hmmm ... :tazz:
oh weLL, at Least i got something

Edited by ska, 14 July 2005 - 03:00 AM.

  • 0

Advertisements


#17
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
finally some good news. congrats!

regarding the editor - any simple text editor will work(i.e. notepad). I don't have any recommendation for a text editor. Perhaps other members will recommend their favorites. I usually use a Visual C++ editor for html(as well as for C++, php, java, javascript, dos, ...).

Apparently, the NVU editor does things that Firefox does not like. And there appears to be something in the code that Firefox does not like. The syntax error I referred to in an earlier post was based on the code in your original post. the document.write() statements were displayed over 2 lines, which can cause a problem. the actual code, however, was ok - the code was all on one line.

the javascript code you provided handles IE and netscape, but not Firefox. are you interested in debugging the code for Firefox?

Edited by bdlt, 14 July 2005 - 04:43 AM.

  • 0

#18
ssone

ssone

    Member

  • Member
  • PipPipPip
  • 301 posts
Notepad is the best editor in my opinion for advanced ppl. Brand new at html, and you want an official editor..use HTML-KIT.
  • 0

#19
ska

ska

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
>>>"finally some good news. congrats!"<<<
ahhh - good support goes a Looong way - thanx ;)

>>>" ...are you interested in debugging the code for Firefox?"<<<
If you're wiLLing - ABSOLUTELY!

>>>"...and you want an official editor..use HTML-KIT."<<<
Since i wasn't abLe to "preview" the htmL in NVU but i was abLe to preview it in CoffeeCup (& most LikeLy htmL-kit, wiLL downLoad & try) does that indicate a probLem with NVU. In other words, is htmL-kit (or something other than NVU) a better option for pubLishing my web-page? I just pubLished my first page about a week ago & am (obviousLy) Learning as i go.

Thanx ...thanx ...& THANX to both of you :tazz:

  • 0

#20
ssone

ssone

    Member

  • Member
  • PipPipPip
  • 301 posts
"publishing" as in actually putting it on the web? or as in preparing it for the web/designing it...for putting it on the web I recommend FileZilla, and for designing/preparing for the web...I recommend html-kit for html begginners. And yes, you can preview it in html-kit.
  • 0

#21
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
ska and ssone,

I have one approach to try for the Firefox browser - treat it the same as the netscape browser. If netscape and Firefox treat javascript similarly, we might get lucky and get by with a minimal number of changes to the code. If they treat javascript dissimilarly - then we'll need a Firefox expert to step in.

This will require some effort and patience on your part, ska. You will be modifying code, testing, and reporting results. If ssone wants to send working code, that's alright too. My approach will hopefully teach some debugging techniques you can use in the future.

Let me know when you are ready to start.

bdlt
  • 0

#22
ska

ska

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
First - i downLoaded htmL-kit & have it up & functioning. i just downLoaded FiLeziLLa but have not instaLLed it yet. So is it your opinion that FiLeziLLa combined wioth htmL-kit is a better way for me to manage my web-page than continuing to use NVU?

>>>"Let me know when you are ready to start."<<<
ok bdlt, i'm going to wrap up a few things & put some coffee on. i'LL be onLine tonite from about 9pm(pst) on. does that work for you? Best way to Learn is hands on so i reaLLy appreciate your offer.
back in a few ...
:tazz:

Edited by ska, 14 July 2005 - 10:12 PM.

  • 0

#23
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
ska,

let's start with MouseTrailElastic.js. please create a new folder(name it elastic or something meaningful) and copy MouseTrailElastic.js and mousetrail4.htm there.

PM me when you are ready to start.

bdlt
  • 0

#24
ssone

ssone

    Member

  • Member
  • PipPipPip
  • 301 posts
haha, i have no idea how far you guys got since he wanted u to pm him, but if you haven't started yet here's a script that you may want to use for now, ska:

(Select from the <html> tag to the </html> tag.)

<html>
<head>
<font face="Verdana" color="00719E" size="-1"><b>Analog Clock (static) for </b></font><a href="http://www.geekstogo...ka-m83715.html" class="menu"><font face="Verdana" color="FF6600" size="-1"><b>SKA</b></font></a><font face="Verdana" color="00719E" size="-1"><b> on geekstogo.com</b></font><br><br>
<font face="Verdana" color="00719E" size="-2">Look in the bottom right corner.</font><br>
<font face="Verdana" color="00719E" size="-2">-SSOne</font>
<script language="JavaScript">
//Analog clock script- By Kurt (kurt.grigg@virgin.net)
//Script featured on Dynamic Drive
//Visit http://www.dynamicdrive.com for this script and more

fCol='FF6600'; //face colour.
sCol='00719E'; //seconds colour.
mCol='00719E'; //minutes colour.
hCol='00719E'; //hours colour.

Ybase=30; //Clock height.
Xbase=30; //Clock width.


H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
Ypos=0;
Xpos=0;
dots=12;
Split=360/dots;
if (NS6){
for (i=1; i < dots+1; i++){
document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:#'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
for (i=0; i < M.length; i++){
document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+mCol+'"></div>');
}
for (i=0; i < H.length; i++){
document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+hCol+'"></div>');
}
for (i=0; i < S.length; i++){
document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+sCol+'"></div>');
}
}
if (NS4){
dgts='1 2 3 4 5 6 7 8 9 10 11 12';
dgts=dgts.split(' ')
for (i=0; i < dots; i++){
document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial size=1 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
}
for (i=0; i < M.length; i++){
document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < H.length; i++){
document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < S.length; i++){
document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
}
}
if (IE4){
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=1; i < dots+1; i++){
document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++){
document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++){
document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++){
document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}
document.write('</div></div>')
}



function clock(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;

if (NS6){
Ypos=window.pageYOffset+window.innerHeight-Ybase-25;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=1; i < dots+1; i++){
document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
if (NS4){
Ypos=window.pageYOffset+window.innerHeight-Ybase-20;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=0; i < dots; ++i){
document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}

if (IE4){
Ypos=document.body.scrollTop+window.document.body.clientHeight-Ybase-20;
Xpos=document.body.scrollLeft+window.document.body.clientWidth-Xbase-20;
for (i=0; i < dots; ++i){
ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
setTimeout('clock()',100);
}
clock();
//-->
</script>
<head/>
<body>
<body/>

<html/>


As for the time zone, I'm in a totally differen't one than bdlt, and I am assuming ska too :tazz:
  • 0

#25
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
ssone,

thanks for the new toy(code). I like it.

we will start later this morning(PST). final results(happy or sad) will be sent in one final post.

bdlt
  • 0

Advertisements


#26
ska

ska

    Member

  • Topic Starter
  • Member
  • PipPip
  • 10 posts
opened the new code in htmL-kit ssone - successfuLLy, i might add. i'm finding my way around the htmL-kit i downloaded at your recommendation & so far it's fairLy intuitive. I'm stiLL uncLear as to whether i can successfuLLy use NVU to manage my webpage or whether i need to use htmL-kit & FiLeZiLLa - but i assume that wiLL become cLearer once i understand htmL & js a bit better (thru bdlt's thoughtfuL guidance).

bdlt, you are in the same time zone as me - caLifornia, right? i'm in oregon.
  • 0

#27
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
the results of our testing - the code for MouseTrailElastic.js will not run on firefox.

the code has conditional statements for IE and netscape, but not for firefox. netscape code is run as the default for the firefox browser. the code was modified to run IE code on the firefox browser. both sadly failed.

this topic is a good challenge for someone familiar with javascript coding on firefox.

coding note: navigator.appName returns "Netscape" when run on a firefox browser. this is why netscape code is run as the default for the firefox browser.
  • 0

#28
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
attached is javascript code found by ska that runs on Firefox.

Attached Files


  • 0

#29
Dragon

Dragon

    All Around Computer Nut

  • Retired Staff
  • 2,678 posts
one of the reasons that particular code won't work in FF is because it was originally designed with MS Frontpage. which handles the code for netscape as well as IE.

in order fo that mousetrail clock to work it will need to be completely rewritten from the beginning for FF.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP