Benton said the following on 3/4/2006 1:46 PM:
"Randy Webb" <Hi************@aol.com> escribió en el mensaje
news:d5******************************@comcast.com. .. I have a text box which will receive its value from a pop-up date picker.
The user should not be able to edit this field with the keyboard or
mouse.
Then use a hidden field.
Please excuse my newbiness but if the field is not visible, the the user
would not get any feedback on the value returned by the date picker. Sure I
am missing something.
You say you are using a popup date picker. Fine. When the date picker
puts the value in the text field then you also have it put it in a span
element to display it to the user. Then, the user gets feedback, they
can't change it, and your hidden field gets the value. You could even
style the span to *look* like an input field.
Without seeing your date picker, and how it sets the hidden field, I can
only guess at how to tell you to do the above though. The simplest way
might be for the date picker to call a function in the opener window
that would set it:
opener.setDateValue(dateValueFromPicker);
And then in the opener:
function setDateValue(dateValue){
document.forms['formID'].elements['hiddenFieldName'].value = dateValue;
document.getElementById('spanID').innerHTML = dateValue;
}
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/