I wan't to be able to have a list of birthdates advance by one digit when that particular persons b-day rolls around. Is there a simple script out there that I can apply here?
Thanks in advance,
No. You'll need server-side code, and a database in which to store the dates.
but sometimes you can't use server side code, and sometimes you don't have a database to back your application.
It's just a little 'ol web page, isn't there a way to say in a script...
"so and so was born on this date - and today is this date - so that makes them this age"?
I saw a script that would tell you "How long have you had that job? -or- How many days old are you?", so why can't you have one that calculates years based on a birth date and the current date?
I don't always recommend the server-side option, but in this case, you'd have to agree, it is the most sensible approach.
So for this scenario, you'll need server-side code.
If by "your code" we mean "code residing on and processed by your web server", then you would store everyone's birthdays on the server. You'd either use a database, such as MySQL, or an XML file.
The problem with that is, cookies don't last. The user can decide whether or not to accept cookies in the first place, and can arbitrarily delete them. For example, on my systems, the cookies don't last beyond the current browser session. So you could "remember" my date of birth for about 5 minutes, which renders your script useless.
That's why, in my opinion, my first answer is correct: "No.", there isn't a simple script to do this, and you'll need server-side code coupled with a persistent data store.
In that script you referenced, notice that a date is being passed into the "countup" function. You have to ask yourself, where did that date come from? It's hard-coded in the example! Well, you obviously cannot hard-code each of your users' birthdays in your script. You have to PUT an individual's birtday in the script, either client-side, by retrieving from a cookie, or server-side, by retrieving it from your database.
Yup, its hardcoded in there... but you could get the value from a text field or something. But this wouldn't really serve any real use... except for working out exactly how old you are... this may prove useful as i get older..
alpha_foobar: we're straying off topic, but I think the discussion has some merit, so I'll forge ahead.
I'm a web-developer (actually, an application developer who often writes web-enabled applications). Over the years I've come to the conclusion that any web application must use both server-side code and client-side code.
I've also realized that most new web developers don't understand that. Many are entering web development from the graphic design field, and so are very used to working with user interfaces. For them the natural assumption is to try to do everything via client-side code.
As a contrast, many ASP.NET developers come from traditional desktop Windows development, and so have no concept of client-side code. In fact, they often resort to (because ASP.NET encourages) the most bizzare server-side code contortions, when what they really should use is a client-side function.
Well, actually, I was looking for a sensible solution. Having someone write me a JS wasn't my initial intention, but I'll take whatever is offered gladly and graciously :)
I would never ask someone to create something for me that they didn't want to create just because I didn't want to do the work, but have found that most follks here (yourself included) are very helpful. It was my belief that something suited for my needs already existed and was simply looking to be pointed in that direction.
I suppose it could be called lazy or opportunistic, but I was not (nor am I now) at a place where I can spend a lot of time learning things that are already offered freely across the net. Just the same, :!:thank you:!: for the time you put in. When I next update my brother's website I plan to implement the script you have provided :) .
The hard coded solution you have supplied is perfect for my needs, so thanks again, happy new year and best wishes to you.
I'm working in Excel to extract content of a table from a web page and populate Excel sheet cells with it. I'm trying to extract data from a table that gets loaded to a web page after show results method gets called. I have an error that says "Run-time error ...
When accessing from ######1.co.uk (which has an SSL) to document root ###/production everything works fine.
However when accessing ###/production from ######2.co.uk (which doesn't have an SSL - set up in the vhost file) the home page displays fine but the other pages are returning a 404.
Here's the entry in ...
I would like to know if this is an appropriate forum to ask these questions.
Website Example: http://www.shoparc.com
I would like create a similar site in WordPress. I have some experience with WordPress but would like to know:
What theme is this site using?
How would I create ...