Fill a field with todays day

  • Thread starter Thread starter ReidarT
  • Start date Start date
R

ReidarT

I want to fill a html control (id) = lblDayHtml with todays day

now = new Date();
date = now.getDate();
day = now.getDay();
document.Form1.lblDayHtml.value = day();

I get the message:
document.Form1.lblDayHtml is null or not an object

regards
Reihaa
 
hi,

is that a web control ? if so do it in the server.

If not, what kind of javascript control it's?

probably you do not have Form1 defined. Try using document.all["lblDayHtml"]
also look the html code generated in the browser and see ifyou have such a
control

cheers,
 
Back
Top