(only part of the function is given here as it is the most relevent code snippet for our discussion of the stated problem)
Code: Select all
var newCell2 = newRow.insertCell(2);
var el = document.createElement('input');
el.type = 'text';
el.name = 'rec[]';
el.id = 'txtRow' + iteration;
el.size = 20;
newCell2.appendChild(el);
When the function containing the above piece of codes is called (onClick event of a button), it addes a row and inserts a Text Box in the 3rd cell.
Here, I want to be able to pop-up a Calander when we click on the text box or the text box gets focus set on it (as by Tab).
I tested whether I could use any function by using these two events:
Code: Select all
el.onClick = alert("Hello!");
el.onChange = alert("Hello!");
If we can fire the alert() function as we want here, then we can call a function to show a calander too.
Any suggestions?