I have this code:
var StateTextBox = document.getElementById("State");
function InitializeVP() {
StateTextBox.value = "Test"
}
It can't find the StateTextBox as a variable... Does anyone know why?
When I do it like so:
function InitializeVP() {
document.getElementById("State").value = "Test"
}
It works. Can anyone explain to me what I am doing wrong please?