Hi,
I'm not sure where to post this..eeekkk!
But i'd like to add today's date & possibly the time to my website... does blue voda offer a programme that does this?
Many thanks
the ever learning pigletxx
Hi,
I'm not sure where to post this..eeekkk!
But i'd like to add today's date & possibly the time to my website... does blue voda offer a programme that does this?
Many thanks
the ever learning pigletxx
Yes. In BlueVoda, go to Insert> Ready To Use Javascripts.
Hi thaks for your reply,
Found the javascript... but now how do i input the date that automatically updates itself everyday? do i need a specific date program or something?
a sighing pigletxx
It's me again... found insert>javascript - but not - Ready to Use Javascripts. so what are they?
Might be easier & less frustrating for you if maybe you take me through it from the beginning. so far I have my index.html page infront of me. I want it to display the date maybe the time, something that will update itself.
A struggling to get it pigletxx X:o)
Hi Racefan, you have mailOriginally Posted by racefan20
Let's give our friens a hand:
Open a html box in your page. Double click it to edit it. In the window that opens put this code:
<form name=myForm>
<input type=button value="Loading..." name=clock></form>
<SCRIPT LANGUAGE="JavaScript"><!--
function runClock(){
theTime = window.setTimeout("runClock()", 1000);
d = new Date();
day = d.getDay();
mon = d.getMonth();
date = d.getDate();
year = d.getYear();
hr = d.getHours();
min = d.getMinutes();
sec = d.getSeconds();
if(year<1000){year=(""+(year+11900)).substring(1,5 );}
else{year=(""+(year+10000)).substring(1,5);}
if(hr==0){ap=" AM";hr=12}
else if(hr <= 11){ap=" AM"}
else if(hr == 12){ap=" PM";hr=12}
else if(hr >= 13){ap=" PM";hr-=12}
if(min <= 9){min="0"+min}
if(sec <= 9){sec="0"+sec}
zday=new Array();
zday=["Sunday","Monday","Tuesday","Wednesday","Thursday" ,"Friday","Saturday"];
zmon=new Array();
zmon=["January","February","March","April","May","June", "July","August","September","October","November"," December"];
document.myForm.clock.value=""+zday[day]+", "+zmon[mon]+" "+date+", "+year+" "+hr+":"+min+":"+sec+ap+"";}
runClock();
//--></script>
Put the html box wherever you like in your page.
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
It worked!! Thanks everso.... easy when you know how eh? lol
Can I just pick your brains on something else... is it possible for the date just to be in dark blue (navy) font without the 'box/button"?
a very grateful pigletxx
Sorry, this is a ready made script. There are others that give separataly the date and the time, then you can combine them. Make a searchOriginally Posted by pigletxx
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
Thank for all your time & help.... it's been brill!
bless you X:o)
A very thankful pigletxx
Nice one NavalD...I just borrowed it too. Works a treat. Mind having a go at solving my other nittypicky thingy. Q. is here someplace, Published site problems...It's not the 'puzzle query, I solved that. It's FTP problem I think.
So what's your problem, if any?Originally Posted by kenkew
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
This script is wonderful. I just added it to my website. Thanks for making my day unexpectedly great!
Navaledesign, or Anyone:
How do I add 28 calendar days to today's date and display that value? Do you have a script for doing that?
Doug
No, i don't. I beleive one can be easily made if one has a reference point (sorry, i don't know what is the date according to the 28 day calendar). Give me a reference point, and the month names and i'll see if can prepare something for you.
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
All I want to do is add 28 days to whatever today's date is and display it. Todays date will always change, so that value will always change also.
Can anyone still help me on my last question? I need a javascript that will add 28 days to today's date and display it.
Doug
Please note that the 28 days calendar doen't simply add 28 days to the present date. The 28 days calendar is based on a 13 month (instead of 12) basis, which makes 28X13=364 plus one "Rest "day. And, it is counted from a reference date. So if you want to display the 28 say calendar correctly, you need to have that reference date.
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
I do not care about a 28 days calendar. (It was only by coincidence that I said 28, but that may change for me anyway). I may as well be trying to add 11 days, or 16 days, or 55 days for that matter. Just give me an example where ANY NUMBER of days are added to today's date and that new date is displayed.
Doug
Ok, i'll figure out something for you. Let you know tomorrow. Must it be Javascript or can it be server side (php) ? Please note that if it is php, you need to publish your pages as php
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
Just some javascript that I can set right on my page is all I need.
Doug
Navaldesign,
Just wondered if you might have a script for me yet. Your help is appreciated.
Doug
Working on it. It is harder to do if you need a variable number of days, as it has to take care also of 1. Day change (F.e. if you want a 8 day difference, Monday should become Tuesday, if you need a 10 days difference, Monday should become Thirsday and so on) 2. Month change (you need to check if the month changes f.e. adding 28 days to September 4 makes it October 2, whilst adding 28 days to October 4 makes it November 3: depends on the month days, which are variable 28,29,30,31) 3. Year change (adding 15 days to 20 December 2006 makes it January 4 2007)
I think i'll make it, just give me some time.
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
Here is an example of adding 5 days, but I cannot get it to work in Blue Voda:
// Get today's date
Calendar now = Calendar.getInstance();
Calendar working;
SimpleDateFormat formatter = new SimpleDateFormat("E yyyy.MM.dd 'at' hh:mm:ss a zzz");
working = (Calendar) now.clone();
working.add(Calendar.DAY_OF_YEAR, + 5);
prt(" In five days it will be: " + formatter.format(working.getTime()));
prt();
}
Here is something simple. It can work for positive differences up to 31 days, but it will not work correctly if the new date goes over 28 February and, in the same time, February has 29 days. Since this is going to happen in 2008, you have more than one year to find another solution. Copy the code and simply paste it in a html box in your page. Then place the html box anywhere you want it in your page. To edit the days period, edit the number in RED
<form name=myForm2>
<input type=button value="Loading..." name=clock></form>
<SCRIPT LANGUAGE="JavaScript"><!--
function runClock(){
theTime = window.setTimeout("runClock()", 1000);
d = new Date();
mon = d.getMonth();
date = d.getDate();
year = d.getYear();
hr = d.getHours();
min = d.getMinutes();
sec = d.getSeconds();
diff = 25
date2 = date;
date+=diff;
monthdays = new Array();
monthdays = [31,28,31,30,31,30,31,31,30,31,30,31];
if(date>monthdays[mon]){date-=monthdays[mon] ; mon+=1}
if (mon>13) {mon-=12 ; year+=1}
if(year<1000){year=(""+(year+11900)).substring(1,5 );}
else{year=(""+(year+10000)).substring(1,5);}
if(hr==0){ap=" AM";hr=12}
else if(hr <= 11){ap=" AM"}
else if(hr == 12){ap=" PM";hr=12}
else if(hr >= 13){ap=" PM";hr-=12}
if(min <= 9){min="0"+min}
if(sec <= 9){sec="0"+sec}
zmon=new Array();
zmon=["January","February","March","April","May","Ju ne", "July","August","September","October","Novembe r"," December"];
document.myForm2.clock.value=""+zmon[mon]+" "+date+", "+year+" "+hr+":"+min+":"+sec+ap+"";}
runClock();
//--></script>
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
NavalDesign: THANK YOU so much! Just what I was looking for.
Doug
Hi Navaldesign,
The script you gave me has been working fine until now. But it is not working now because it has to cross into January of next year with its date difference. The proper date is not displaying now. Could you please look at the script again and correct it so it will display the right date in January? It looks like you put code in to take care of yearly crossovers, but it is not working right.
Doug
Can you please provide me with a link to the page with the script ?
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
I temporarily removed it from the page since is was not working.
If you would, just create a blank web page and do a create HTML box and preview it from there?
Here is the code I have:
<form name=myForm2>
<input type=button value="Loading..." name=clock></form>
<SCRIPT LANGUAGE="JavaScript"><!--
function runClock(){
theTime = window.setTimeout("runClock()", 1000);
d = new Date();
day = d.getDay();
mon = d.getMonth();
date = d.getDate();
year = d.getYear();
hr = d.getHours();
min = d.getMinutes();
sec = d.getSeconds();
diff = 14
date2 = date;
date+=diff;
monthdays = new Array();
monthdays = [31,28,31,30,31,30,31,31,30,31,30,31];
if(date>monthdays[mon]){date-=monthdays[mon] ; mon+=1}
if (mon>13) {mon-=12 ; year+=1}
if(year<1000){year=(""+(year+11900)).substring(1,5 );}
else{year=(""+(year+10000)).substring(1,5);}
if(hr==0){ap=" AM";hr=12}
else if(hr <= 11){ap=" AM"}
else if(hr == 12){ap=" PM";hr=12}
else if(hr >= 13){ap=" PM";hr-=12}
if(min <= 9){min="0"+min}
if(sec <= 9){sec="0"+sec}
zmon=new Array();
zmon=["January","February","March","April","May","Ju ne", "July","August","September","October","Novembe r"," December"];
zday=new Array();
zday=["Sunday","Monday","Tuesday","Wednesday","Thurs day" ,"Friday","Saturday"];
document.myForm2.clock.value="Fourteen days from now will be "+zday[day]+", "+zmon[mon]+" "+date+", "+year+"";}
runClock();
//--></script>
Thanks!
Doug
Guess no one is around to answer me on this. It should resolve itself come Jan 1. Anyone is invited to reply though, if you have nothing else to do for the next few days.
Sorry, my mistake. The Months numbering for the script starts from 0, so the correct script should be as follows:
<form name=myForm2>
<input type=button value="Loading..." name=clock></form>
<SCRIPT LANGUAGE="JavaScript"><!--
function runClock(){
theTime = window.setTimeout("runClock()", 1000);
d = new Date();
day = d.getDay();
mon = d.getMonth();
date = d.getDate();
year = d.getYear();
hr = d.getHours();
min = d.getMinutes();
sec = d.getSeconds();
diff = 14
date2 = date;
date+=diff;
monthdays = new Array();
monthdays = [31,28,31,30,31,30,31,31,30,31,30,31];
mon1 = mon
if(date>monthdays[mon1]){mon+=1}
if(date>monthdays[mon1]){date-=monthdays[mon1]}
if(mon>11){year+=1}
if(mon>11){mon-=12}
if(year<1000){year=(""+(year+11900)).substring(1,5 );}
else{year=(""+(year+10000)).substring(1,5);}
if(hr==0){ap=" AM";hr=12}
else if(hr <= 11){ap=" AM"}
else if(hr == 12){ap=" PM";hr=12}
else if(hr >= 13){ap=" PM";hr-=12}
if(min <= 9){min="0"+min}
if(sec <= 9){sec="0"+sec}
zmon=new Array();
zmon=["January","February","March","April","May","Ju ne", "July","August","September","October","Novembe r"," December"];
zday=new Array();
zday=["Sunday","Monday","Tuesday","Wednesday","Thurs day" ,"Friday","Saturday"];
document.myForm2.clock.value=" Fourteen days from now will be "+zday[day]+", "+zmon[mon]+" "+date+", "+year+"";}
runClock();
//--></script>
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
Thanks, Navaldesign! How did you learn how to program Javascript, btw?
Doug
I don't know how to program in javascript. I'm just using my php knowledge which has some similarities with Javascript.
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!
Hi Naval
Is there a way to have the date and time as just text and in a smaller font (without the button)?
Thanks!
Originally Posted by navaldesign
Hey.
How can I add just a date without the current time ?
Bluevoda tips and tricks section HERE
and this thread is a great blast from the past.....................
Thank you....
Your welcome..............
There are currently 1 users browsing this thread. (0 members and 1 guests)