Page 1 of 1 [ 9 posts ] 

dexkaden
Veteran
Veteran

User avatar

Joined: 29 Dec 2005
Gender: Female
Posts: 1,967
Location: CTU, Los Angeles

17 Dec 2006, 5:03 pm

So, I am not a programmer and while I know basic html (very basic), I use Apple's iWeb for everything. (iWeb is a WYSIWYG editor.) That's fine, and I am using that for basic design purposes, but I want to add a countdown timer to my 24 website I am building, and am using Nvu (a free WYSIWYG editor) that lets me actually manipulate the source code. I also have the javascript applet thing (yes, I realize that I have no idea what I am talking about here, obviously) written by someone else who gave me permission to use the code, but I don't don't know how to get it all to work. Can someone PLEASE help me? I am a bookworm that happens to be getting interested in web design, so I don't have the skill yet. I need someone to help me out. Please.


_________________
Superman wears Jack Bauer pajamas.


Drakilor
Pileated woodpecker
Pileated woodpecker

User avatar

Joined: 14 Sep 2006
Age: 177
Gender: Female
Posts: 186

17 Dec 2006, 5:27 pm

So you have a JavaScript and need to implement it?
It could be put in a separate file and linked to or embedded directly withing the <head> tags. How more exactly it should be implemented depends on how it outputs. If it only sets a variable, you need to write some lines of code to make it visible on the screen.



alex
Developer
Developer

User avatar

Joined: 13 Jun 2004
Age: 38
Gender: Male
Posts: 10,216
Location: Beverly Hills, CA

17 Dec 2006, 5:31 pm

are you talking about java or javascript? both are completely different.


_________________
I'm Alex Plank, the founder of Wrong Planet. Follow me (Alex Plank) on Blue Sky: https://bsky.app/profile/alexplank.bsky.social


dexkaden
Veteran
Veteran

User avatar

Joined: 29 Dec 2005
Gender: Female
Posts: 1,967
Location: CTU, Los Angeles

17 Dec 2006, 5:31 pm

Hey, thanks for the reply, but I have no idea what you are talking about--it's all a foreign language to me. So I have the CSS script (extension .css), the javascript (extension .js), and graphics required for the countdown all in in one folder, which is the same folder my site files are stored in. So far, I have just tried to copy and paste the script into the html document...and nothing happens. If I show you the code, can you tell me what I am doing wrong?


_________________
Superman wears Jack Bauer pajamas.


alex
Developer
Developer

User avatar

Joined: 13 Jun 2004
Age: 38
Gender: Male
Posts: 10,216
Location: Beverly Hills, CA

17 Dec 2006, 5:33 pm

ok, can you post a link to the html page with the js in it?


_________________
I'm Alex Plank, the founder of Wrong Planet. Follow me (Alex Plank) on Blue Sky: https://bsky.app/profile/alexplank.bsky.social


dexkaden
Veteran
Veteran

User avatar

Joined: 29 Dec 2005
Gender: Female
Posts: 1,967
Location: CTU, Los Angeles

17 Dec 2006, 5:34 pm

alex wrote:
are you talking about java or javascript? both are completely different.


Yeah, I know they're different. But I have no idea which one I have. All I know is I found a 24 countdown timer on 24boards.com, asked the admin if I could use the code, he said yeah and sent it over to me, and now I have a bunch of code and pictures and a .css--AND ABSOLTELY NO IDEA WHAT TO DO WITH THEM. I thought it would be so easy... :roll:

I really am not stupid, just ignorant about a lot of stuff.


_________________
Superman wears Jack Bauer pajamas.


dexkaden
Veteran
Veteran

User avatar

Joined: 29 Dec 2005
Gender: Female
Posts: 1,967
Location: CTU, Los Angeles

17 Dec 2006, 5:35 pm

alex wrote:
ok, can you post a link to the html page with the js in it?


Um...it isn't published yet?


I feel like such an idiot.


_________________
Superman wears Jack Bauer pajamas.


chesirecat
Blue Jay
Blue Jay

User avatar

Joined: 15 Oct 2006
Age: 35
Gender: Male
Posts: 81
Location: Hamilton, Ontario

17 Dec 2006, 7:54 pm

I went on 24boards.com and to implement this just look at his source code:

so assuming he gave you the same files he is using and with the right names:

first put all the files in a new folder where the html file is and call it countdown

second,in the heading put (assuming this is the file name of ur code and u put the source code file in the same folder as the html file), i'm removing the first section of the tag so i can post it(ie the < and the >):

head
script src="countdown/countdown.js" type="text/javascript"
/script
/head

third, the body tag should be as follows:

body onLoad="getTime()"

and you can leave any other attributes within there. this makes sure the javascript begins counting.

fourth, within the body put(assuming u haven't changed the vars in the source code, also requires images to be there):

div id="idx1" class="blocktable">
h2
span>Countdown to whatever u want
</span
/h2

div id="countdown">
img src="countdown/0c.gif" name=x>
img src="countdown/0c.gif" name=a>
img src="countdown/0c.gif" name=b>
img src="countdown/Cc.gif" name=c>
img src="countdown/0c.gif" name=y>

img src="countdown/0c.gif" name=z>
img src="countdown/Cc.gif" name=cz>
img src="countdown/0c.gif" name=d>
img src="countdown/0c.gif" name=e>
img src="countdown/Cc.gif" name=f>
img src="countdown/0c.gif" name=g>
img src="countdown/0c.gif" name=h>
/div>

/div>

It is important you don't change the name of any of these things and they are all in the right folder.
For the css file it is just a code that tells the webpage what style every aspect is and u just link to it in the head:

link rel="stylesheet" type="text/css" href="nameofyourfile.css" />

It is called a cascading style sheet. I would try to get the javascript working first cuz you don't need the css.



dexkaden
Veteran
Veteran

User avatar

Joined: 29 Dec 2005
Gender: Female
Posts: 1,967
Location: CTU, Los Angeles

17 Dec 2006, 7:57 pm

Hey, thanks! I'll give it a shot!


_________________
Superman wears Jack Bauer pajamas.