controlling document.write
Hey there,
I'm trying to work with the following code:
[code:2eq7d12s]
funtion setdate (){
var currentTime = new Date();
var year = currentTime.getFullYear();
var hyearb = year-100;
for($i= hyearb; $i<= year ; $i++) {
document.write( "<option value=\"$i\">$i</option>");
}
}
[/code:2eq7d12s]
I need it to write the loop into the page between <select> </select> tags.
I'm sure it's easier than I'm making it, I just don't fully understand javascript yet.
Thanks