Hi ,
i need the modified verson of following java script ,current script shows current date and days in current month ,but i want to modify it in such way so it should not show previous days from today eg-: if today is 20 th nov then it should not show 19,18......
<script type="text/javascript">
window.onload = function(){
document.getElementById('d').setAttribute('disabled', '');
document.getElementById('m').setAttribute('disabled', '');
var now = new Date();
now.setDate(now.getDate() + 7);
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
for(var i = 1; i <= 31; i++){
var j = document.getElementById('d').options.length;
document.getElementById('d').options[j] = new Option(i, i);
if(i == now.getDate()) document.getElementById('d').options[j].selected = true;
}
for(var i = 1; i <= 12; i++){
var j = document.getElementById('m').options.length;
document.getElementById('m').options[j] = new Option(months[now.getMonth()]+' '+now.getFullYear(), (now.getMonth() + 1)+'_'+now.getFullYear());
if(i == 1) document.getElementById('m').options[j].selected = true;
now.setMonth(now.getMonth() + 1);
}
}
</script>
thankx in advance