I am working on legacy app. Can someone tell me what does each line of code below return in old browsers so I can convert to the right upgraded syntax.
// form-name and input-name is just an example for a form annd input field
form-name.input-name.value
form-name.input-name.returnValue // How is this different than the one above
form-name.input-name.setValue() // I believe this sets the value
input is an input text field. Also the code is very IE specific. Here is an example of how an input if first selected and then those properites are called on it.
function GetInputFieldById(id) {
return window.document.all(id)
}
var name = GetInputFieldById('name4308').returnValue;
As you can tell it is so old, they could have just used getElementById() but not sure may be it was not part of the standard spec yet. Also, the same way after input is returned setValue() is called on it.