snowboardr
Programmer
I am trying to get setTimeOut to run a function, with a variable in it, but its not working... I have also tried single quotes instead of quotes around the function. Any ideas?
Do you got a million? www.gotamillion.com/?r=T
Code:
setTimeout("saveTextBoxHeight(newheight)", 1000);
Code:
// Make post textbox larger
function makeLarger(strTextBoxId) {
var fieldTxt = document.getElementById(strTextBoxId);
var newheight = fieldTxt.rows + 2;
if(newheight > 40) {
alert('Max textbox height reached.')
} else {
fieldTxt.rows = newheight;
setTimeout("saveTextBoxHeight(newheight)", 1000);
}
}
Code:
function saveTextBoxHeight(intNewHeight) {
alert('Saved : ' + intNewHeight)
// do saving here
}
Do you got a million? www.gotamillion.com/?r=T