Poll
29%
14%
43%
14%
[php]<cfset bottles = 99>
<cfloop from="99" to="1" step="-1" index="countdown">
<cfoutput>
#countdown# bottles of beer on the wall,<BR> #countdown# bottles of beer...
<cfset countdown = #countdown#-1>
<p> take one down...<br> pass it around...<br> #countdown# bottles of beer on the wall! <br>
<br></cfoutput>
</cfloop>[/php]
Originally posted by TattooDamn Cold Fusion pitt_fist
[php]<cfset bottles = 99>
<cfloop from="99" to="1" step="-1" index="countdown">
<cfoutput>
#countdown# bottles of beer on the wall,<BR> #countdown# bottles of beer...
<cfset countdown = #countdown#-1>
<p> take one down...<br> pass it around...<br> #countdown# bottles of beer on the wall! <br>
<br></cfoutput>
</cfloop>[/php]
[code]
function updateDIM(){
var month = document.events.monthStart.value;
var year = document.events.yearStart.value;
var days = getDaysInMonth(month,year);
document.events.dayStart.options.length = 1;
//alert(document.events.dd.length);
var i = 0;
var n = 1;
var lead = "0";
while (i < days) {
if (n < 10) {
lead = "0";
} else {
lead = "";
}
document.events.dayStart.options[i] = new Option(n,(lead + n),true,true);
//alert(lead);
n++;
i++;
}
now = new Date;
cd = now.getDate();
document.events.dayStart.options[cd-1].selected = true;
}
function updateDIM2(){
var month = document.events.monthEnd.value;
var year = document.events.yearEnd.value;
var days = getDaysInMonth(month,year);
document.events.dayEnd.options.length = 1;
//alert(document.events.dd.length);
var i = 0;
var n = 1;
while (i < days) {
if (n < 10) {
lead = "0";
} else {
lead = "";
}
document.events.dayEnd.options[i] = new Option(n,(lead + n),true,true);
n++;
i++;
}
now = new Date;
cd = now.getDate();
document.events.dayEnd.options[cd-1].selected = true;
}
function getDaysInMonth(month,year) {
var d = new Date();
d.setYear(year);
d.setMonth(month-1);
d.setDate(month-1)
d.setDate(32);
return 32 - d.getDate();
}
[/code]
Originally posted by PITT_HAPPENS
I steal code when I can and then modify it to make it do what I want, I normally write simple JavaScript the complex stuff like AJAX is still beyond me.
All we had to do was modify a fake Fair website that would count down the number of days left till the Fair and I failed at it. ๐
I was able to get the right code down for copyright info you can put at the bottom of pages. 131
Originally posted by RรถlandDealing with time in any language is a tuff one to do, the one I posted above will update a drop box with the current days of the month depending on the dates they select. That was a pain in the arse.
All we had to do was modify a fake Fair website that would count down the number of days left till the Fair and I failed at it. ๐I was able to get the right code down for copyright info you can put at the bottom of pages. 131
Originally posted by PITT_HAPPENS
Dealing with time in any language is a tuff one to do, the one I posted above will update a drop box with the current days of the month depending on the dates they select. That was a pain in the arse.
HTML = Fun. 131
JAVASCRIPT = Not even close to the fun department. ๐