java(script)/form question

  • Thread starter Thread starter sluijten
  • Start date Start date
S

sluijten

I am a complete novice to java/javascript.
Is it possible to have a form with a hidden inputfield that gets
updated (by a javascript) whenever *another* (unhidden) field changes
its value due to user input ?

The hidden field is a date with a format that is sortable by mysql,
like 2007-07-20, the user input field that triggers the hidden field
has another format: Friday 20 July 2007

Any examples would be great!
 
Now my next problem is that the 'to' field is also calculated by a
java script, when it gets the focus, a calendar pops-up and the user
can select a date, like this:

<input type="text" name="datum" onFocus="getCalendarFor(this)">

Whatever event I add, it doesn't work to copy the value to the other
input field.
And... getCalendarFor is quite complex, I don't want to change
anything there.

Any more hints?
 
<corrected:>

My next problem is that the 'from' field is calculated by a
java script. When it gets the focus, a calendar pops-up and the user
can select a date, like this:

<input type="text" name="datum" onFocus="getCalendarFor(this)">

Whatever event I add, it doesn't work to copy the value to the 'to'
field.
And... getCalendarFor is quite complex, I don't want to change
anything there.

Hints?
 
Back
Top