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,
 
aaaa, javascript or csharp, you always confused by this questin???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top