Forum Moderators: open
I recall seeing one a couple of years back where the script displayed a different graphic based on the month e.g. imagejanuary.gif imagefebruary.gif
Thank you :)
use image names like 'imageMay' and it will work just fine ;)
"Page last updated: [date of last serious, major update]"
is useful, but
"Today's date is: [today's date]"
or worst of all
"Page last updated: [today's date or date last typo was fixed]"
are useless at best and will drive users away at worst since your credibility will be compromised. I hope that doesn't sound too negative. You know what they say about opinions....
Tom
'ergophobe', I see your point. I work 12 hours a day/7 days a week to keep my sites up-to-date. However, I am trying to automate certain things so that I'll have the chance to leave me some time to occasionally take a few steps away from my PC :)
If I use such a script alongside similar text links, I could promote seasonal offers on my sites without having to make the changes manually? e.g. for my movie site: February = Romantic movies; October = Halloween movies; December = Christmas promotion.
Don't you think that is a good idea to automate such advertising and save myself time?
I agree, it's good idea to let a script take care of 'updates' like that. I used to have a 'joke of the day' on one of my Web sites .. People loved it, even though they knew that it was automated.
But, ergophobe, I see your point. It is totally useless (will even have a negative impact on the visitor) to use JavaScript to 'fake' updates.
To have dynamic content, depending on the day or month, can be useful, if it has a purpose and if you used your brain when you thought of the purpose. ;)
Just one other thing I wanted to ask: is there any way of making an ammendment to your script so that I can send the surfer to a different URL depending on the month? I've decided I'd like to send my visitors to a weight-loss site in January, flower-selling site in February, my Christmas store in December etc. :)
Thanks!
Don't you think that is a good idea to automate such advertising and save myself time?
Most definitely. That's why I was worried about sounding too negative, but I think you both took my point in the sense that it was intended. Dynamic content that is fed based on certain conditions is wonderful and worth the effort. I have just seen so many sites where the designer uses Javascript to *fake* freshness. It can be like the "NEW!!" label that identifies something from three years ago.
Dynamic methods of *creating* real fresh pages that give the user something appropriate is great, especially if you sell things that are themed (Valentine's day stuff in your case). Joke of the day can be great too.
Cheers,
Tom
Just use the
document.write() function and customize it for your needs. Example:
document.write('<a href="' + months[themonth] + '.html">Link text goes here</a>'); And you know what? You can re-use the
months[themonth] variable as often as you want. If you want several 'customized' links and images and what not .. just make sure that the first script I gave you is somewhere near the top of your page, preferrably in the HEAD section. Then, whenever you want to use it, just add another script that only contains the document.write() statment. Your browser will remember the value of the months[themonth] variable ;) For redirection, just use this syntax:
location.href = months[themonth] + ".html";