Jump to content

how can i insert this into a field / hidden field?


toolman

Recommended Posts

Hi,

 

I have the following code which I would like to insert into a field/hidden field.

 

var now = new Date();
now.setDate(now.getDate());
document.getElementById("s_creation_date").innerHTML = now;

 

I have the following HTML:

<input type="text" name="s_creation_date" id="s_creation_date" />

 

I tried using the getElementbyId, but it didn't work.

 

Any ideas?

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.