WEhalt
asked on
Java select entire value in form field
How do I select the entire value in the field in addition to setting focus as I have below.
function DynamCkTextBox(thisTextBox ) {
var dVal = 0;
if (isNaN(thisTextBox.value)) {
thisTextBox.focus();
alert('"' + thisTextBox.value + '" is not a valid value for field ' + thisTextBox.id);
//thisTextBox.style.backgr oundColor = "Yellow"
return false;
}
//thisTextBox.style.backgr oundColor = "White"
dVal = Number(thisTextBox.value);
thisTextBox.value = dVal.toFixed(2);
return true;
}
function DynamCkTextBox(thisTextBox
var dVal = 0;
if (isNaN(thisTextBox.value))
thisTextBox.focus();
alert('"' + thisTextBox.value + '" is not a valid value for field ' + thisTextBox.id);
//thisTextBox.style.backgr
return false;
}
//thisTextBox.style.backgr
dVal = Number(thisTextBox.value);
thisTextBox.value = dVal.toFixed(2);
return true;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Textbox1.SelStart=0
Textbox1.Selend = Len(textbox1.text)