I have this function that doesn't work. I pass it the td element and
an id, and it makes an input field inside the td. That part workds.
What doesn't work is that I want to add an "onkeyup" on the input
field. Any help? Please??? I don't get any error on my javascript
console in firefox, and I am not seeing any errors in IE.
// makes an input field that submits itself using setCalendarValu e()
when it's blurred (it will be blurred if [enter] is pressed)
function makeCalendarInp utField(el,hour sId,which){
var id=el.id;
// if this input field is already active, then don't let it be
activated again
if(thisCalendar InputField==id) {
return false;
}
else{
thisCalendarInp utField=id;
}
var value = el.innerHTML;
// remember the original value just in case
originalValue=v alue;
el.innerHTML='' ;
var inputField = "<input type='text' value='" + value + "'
name='inputFiel d' id='inputField' "
+ " onBlur='setCale ndarValue(this, \"" + id + "\");'
class='calendar InputField' />"
+ "<input type='hidden' name='" + whichField + "' id='" +
whichField + "' value='" + which + "' />"
+ "<input type='hidden' name='" + hoursIdField + "' id='" +
hoursIdField + "' value='" + hoursId + "' />"
+ "";
// change the innerHTML of this td into this input field
el.innerHTML = inputField;
document.getEle mentById('input Field').focus() ;
el.onKeyUp="ale rt('hi')";
return;
}