• Welcome to The Cave of Dragonflies forums, where the smallest bugs live alongside the strongest dragons.

    Guests are not able to post messages or even read certain areas of the forums. Now, that's boring, don't you think? Registration, on the other hand, is simple, completely free of charge, and does not require you to give out any personal information at all. As soon as you register, you can take part in some of the happy fun things at the forums such as posting messages, voting in polls, sending private messages to people and being told that this is where we drink tea and eat cod.

    Of course I'm not forcing you to do anything if you don't want to, but seriously, what have you got to lose? Five seconds of your life?

Please help

Lucas666

New member
For my website, I need some coding for a countdown clock, and some for my HTML Scripting to change from onr scripting, to another at a specified time. Does anyone know some coding for this?
 
no.

do you how you can do that thing with that and that without that? you know, that way, except not. more like that thing over there, really, except it also does that thing there.

really. nobody can do things with insufficient information.

specifically:

what do you want?

how do you want it?

what language does it need to be in?

why do you want it?

why should we care what you want?
 
Fine then,

what do you want?
script for a countdown clock

how do you want it?
just a basic text one

what language does it need to be in?
English

why do you want it?
For a countdown to March 14th, when HGSS comes out

why should we care what you want?
'Cause your nice



what do you want?
A script that will go from one script (i.e. 'HGSS is coming out on march 14th') to another ((at 12:59 pm March 13th, switch to) 'HGSS came out today')

how do you want it?
I just need it to change my text and any other basic HTML coding

what language does it need to be in?
English

why do you want it?
So that I can add something to my News Archive, at Midnight on the last day of the month

why should we care what you want?
'Cause your nice
 
Fine then,

what do you want?
script for a countdown clock

define "countdown clock"; every clock I've ever seen counts upward and loops. well, or clockwise.

how do you want it?
just a basic text one

okay, fair enough, I guess.

elaborate.

what language does it need to be in?
English

anyone here read computer stupidities?

"what language do you write your programs in?"
"english, of course."

if you can't figure out what's wrong, figure it out before you come back.

why do you want it?
For a countdown to March 14th, when HGSS comes out

and... this is a good idea why?

you know, there's a reason I have a calendar.

it's a fairly reasonable assumption for your target population.

why should we care what you want?
'Cause your nice

if you're being ridiculously unclear, that is rather difficult.

I don't have to be nice.

what do you want?
A script that will go from one script (i.e. 'HGSS is coming out on march 14th') to another ((at 12:59 pm March 13th, switch to) 'HGSS came out today')

this is better.

just do a subtraction and comparison on ever page load.

how do you want it?
I just need it to change my text and any other basic HTML coding

you can't. almost literally.

(yes, I know, you can plug php into your html and stuff, but I don't think this person has any idea what they're talking about, so.)

what language does it need to be in?
English

programming language, not natural language. you can't write scripts in english; it's too imprecise for that.

no, html is not a programming language. it is supposedly a markup language. it isn't even turing-complete.

why do you want it?
So that I can add something to my News Archive, at Midnight on the last day of the month

and this will help with that how?

the best way to do this is to use an if time > target: ...; else null or your language's equivalent.

why should we care what you want?
'Cause your nice

that varies, and is inversely proportional to the number of times you show that you have very little idea of what you're talking about.

your is possessive. you may have wanted 'you''re'; and in any case, you shouldn't count on niceness anyway. some people aren't nice.
 
define "countdown clock"; every clock I've ever seen counts upward and loops. well, or clockwise.

A clock that counts down to a certain date/time


okay, fair enough, I guess.

elaborate.

A clock that is like 5 days 2 hours 3 minutes 20 seconds


anyone here read computer stupidities?

"what language do you write your programs in?"
"english, of course."

if you can't figure out what's wrong, figure it out before you come back.

Sorry, just used to 'languages' being English, French etc. Javascript I guess


and... this is a good idea why?

you know, there's a reason I have a calendar.

it's a fairly reasonable assumption for your target population.

The same reason Walmart has a countdown clock in all their stores just before Christmas, it makes people more excited./B]


if you're being ridiculously unclear, that is rather difficult.

I don't have to be nice.

But, you could say that about anything, and it's not like you have to do it. It would just help me if you would.


this is better.

just do a subtraction and comparison on ever page load.

Subtraction and comparison?


you can't. almost literally.

(yes, I know, you can plug php into your html and stuff, but I don't think this person has any idea what they're talking about, so.)

I'm new to HTML, and have not even started to learn any other coding.


programming language, not natural language. you can't write scripts in english; it's too imprecise for that.

no, html is not a programming language. it is supposedly a markup language. it isn't even turing-complete.

Javascript I guess, although a few people may not see a difference due to having Javascript disabled, I think that I will take that chance.


and this will help with that how?

the best way to do this is to use an if time > target: ...; else null or your language's equivalent.

That way I don't have to get on my computer at midnight just to update a website


that varies, and is inversely proportional to the number of times you show that you have very little idea of what you're talking about.

your is possessive. you may have wanted 'you''re'; and in any case, you shouldn't count on niceness anyway. some people aren't nice.

I realise that some people aren't nice, but, if someones not nice, they aren't anyone I really want to deal with.


For incase you didn't realise, comments are in red and bold.
 
sreservoir, quit being an asshole. Its obvious that you don't care to help him, and that is what he is asking for.
 
sreservoir, quit being an asshole. Its obvious that you don't care to help him, and that is what he is asking for.

after a point, you stop being nice to people who aren't asking their questions clearly. they do get a bit annoying after a while.

but on the contrary, will actually help him - provided he gives the details. I'd like to see you help him without any more details.

and he's given details now, so.

lucas666 said:
A clock that counts down to a certain date/time

A clock that is like 5 days 2 hours 3 minutes 20 seconds

Sorry, just used to 'languages' being English, French etc. Javascript I guess

if javascript is on that list... okay.

I don't know what kind of time functions javascript has (I do not, generally, like to make clients do the work to ensure compatibility), but there have to be libraries out there to convert seconds to hours/minutes/seconds. then you can just do func(target - time()) or the local equivalent.

The same reason Walmart has a countdown clock in all their stores just before Christmas, it makes people more excited.

eh, I don't really think walmart is a good example for web design.

But, you could say that about anything, and it's not like you have to do it. It would just help me if you would.
yes. I could. so you should know?

Subtraction and comparison?

you subtract the current time from the target time, and if it's negative, you print that it's been released; if it's positive, you tell them how much time is left.

I'm new to HTML, and have not even started to learn any other coding.

ah, that's a problem. html cannot do that.

Javascript I guess, although a few people may not see a difference due to having Javascript disabled, I think that I will take that chance.

okay.

hm, what's your host? or at least what sort of scripting tools do they provide?

That way I don't have to get on my computer at midnight just to update a website
I never really saw the point of updating at midnight, but eh. your best course of action is somehing like this:

Code:
if current time is earlier than target time:
  write out the time information
else
  write out the news post

that's pseudocode, so you'll have to translate it to whatever language you're using.

if you do it in a client-side language, you'll have the problem of people viewing the source reading the post before time, though.

I realise that some people aren't nice, but, if someones not nice, they aren't anyone I really want to deal with.

at some point, you realize that there aren't that many nice people out there and make do with the less mean people.

so now that you're demonstrating that you kno what you want, I need to know what tools you have at your disposal.
 
Well, I'm using Webs, and I'm not exactly sure what tools I have at my disposal, but here is what I got from their 'FAQ'.

Webs.com said:
What programming languages can I use?

Premium service customers can use CGI/Perl. However, this type of programming is not available for free account holders, nor do we support the use of MySQL, MSACCESS or PHP. You can, however, link to remote scripts from your website.

Although, I know that they allow SSI, and Javascript (I used a small snippet of them, so I know from presonal experience)

P.S. I'm a free user
 
Well, I'm using Webs, and I'm not exactly sure what tools I have at my disposal, but here is what I got from their 'FAQ'.



Although, I know that they allow SSI, and Javascript (I used a small snippet of them, so I know from presonal experience)

P.S. I'm a free user

oh.

do you have a relatively large number of visitors to your site? because if not, standard advice is to shift to something other than freewebs (now webs), because they have notoriously poor support for scripting.

if you really need to stay at webs, you'll probably be stuck using javascript, for which I can't help you with past concepts.

if you do decide to move to a new host, ensure that it supports some sort of server-side scripting.
 
Yeah, I'm currently moving to X10Hosting, this is the scripting that it allows (according to free-webhosts.com); CGI, PHP, ASP.NET, SSI, FrontPage Server Extensions, Perl and Python.
 
I get the impression that most of the visitors to a small, personal website that presumably isn't going to be giving up-to-the-minute news will already be getting their "excitement" about the release elsewhere anyway, but if you insist on a Javascript countdown script then there are plenty out there if you just google a few different search terms. There are two right here on this page. Those particular countdowns won't help with automatically changing your text as far as I'm aware (though, really... is it going to be that big a deal if it doesn't change over instantaneously? I wouldn't think that manually changing one sentence would be hard, and I double anyone would hold it against you if it didn't change now now now) and I don't know of anything pre-written off of the top of my head that would, but I'm sure someone out there has already done it and a search of Google or sites like DynamicDrive would turn something similar up.

Learning a decent server-side language so that you could write something yourself and configure it to do exactly what you want it to would be even better, of course, but I suppose this will do for now.
 
will this work? (of course in the appropriate html 'script' code)

var a = new Date
var b = a.getDate

if(b<14){document.write("HGSS is coming out on March 14th 2010")}

else {document.write("HGSS came out on March 14th 2010")}
 
that's probably more or less the idea, but it might break down on 1 april. (and I suck at js so don't count on me being correct.) as long as you can update before then, it should be fine.
 
Yeah, if I wanted to make it last for longer (Till like 2012) than I would of course add

Code:
var c = a.getMonth
var d = a.getYear

and in the brackets '( )' after if, put instead

(b<=14 c<=03 d<=2010)
 
Back
Top Bottom