Javascript Countdown Help

Help with html/xhtml, css, javascript and other related topics.

Moderator: Moderators

Javascript Countdown Help

Postby DJ-PRIME90 on Sun May 21, 2006 5:01 pm

Is there any way to possibly put the countdown script into a .js file and then somehow put a code like a PHP include where I want the countdown to show up?

At the moment the countdown script is just too big and makes my page go from like 2KB to 7KB and ends up taking alittle bit of time before everything is loaded.

Yesturday I tried to use PHP include and just put "countdown.js" in the include URL area and it just ended up showing the entire script and no countdown.

Thanks.
DJ-PRIME90
Registered User
Registered User
 
Posts: 158
Joined: Sun May 30, 2004 9:08 pm
Location: Montreal, Canada

Postby UseLess on Sun May 21, 2006 5:28 pm

Greetings,

No matter how you do it;

- including the script in the outputted HTML
- a seperate js file

it's still going to take time to get to the client, as Javascript is a client side scripting language it has to tun on the client, where as PHP is a server side scripting language and runs on the server, but then you knew that already.

One way to do it use a Java Applet see here for one: http://www.custombuiltsoftware.co.uk/do ... /web/java/
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK


Return to (X)HTML Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron