Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

how to store var value in to text box

I have retrive the current date but i dont know how to display in text box
below are my syntax please help me soon.
if(document.all.fromday.value == "")
var mydate=new Date();
var year=mydate.getYear();
//alert("aaaa"+year);
if (year < 1000)
year+=1900;
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
//alert("aaaa"+month);
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;
alert("aaaa"+daym);
datetoday="daym"+ "/" +"month"+"/"+"year"
document.all.fromday.value="<%=datetoday%>";
currently using java and jsp to store and retrive the value.
plese help me , thank you :confused: :confused:
[749 byte] By [sarasahg] at [2007-11-11 7:32:36]
# 1 Re: how to store var value in to text box
Please use CODE tags in the future when posting code. It'll make it so much easier for us to read it.

And this looks like javascript to me, java is completely different.
Phaelax at 2007-11-11 22:38:05 >