onchange="check_extension(one)"onchange="check_extension(one)"Here
oneis the Node with the id "one",oneis not the string"one"
Here one is the Node with the id "one", one is not the string "one"
document.getElementById("$field_id");document.getElementById("$field_id");Even if
$field_idis the id"one","$field_id"is a different string
SogetElementById("$field_id")will give you the node with id"$field_id", not the node with id"one".
Even if $field_id is the id "one", "$field_id" is a different string
So getElementById("$field_id") will give you the node with id "$field_id", not the node with id "one".
Fixes
onchange="check_extension('one')"
and
document.getElementById($field_id)
Also I discourage naming string variables with a leading $
onchange="check_extension(one)"
Here one is the Node with the id "one", one is not the string "one"
document.getElementById("$field_id");
Even if $field_id is the id "one", "$field_id" is a different string
So getElementById("$field_id") will give you the node with id "$field_id", not the node with id "one".
Fixes
onchange="check_extension('one')"
and
document.getElementById($field_id)
Also I discourage naming string variables with a leading $
onchange="check_extension(one)"Here
oneis the Node with the id "one",oneis not the string"one"document.getElementById("$field_id");Even if
$field_idis the id"one","$field_id"is a different string
SogetElementById("$field_id")will give you the node with id"$field_id", not the node with id"one".
Fixes
onchange="check_extension('one')"
and
document.getElementById($field_id)
Also I discourage naming string variables with a leading $
onchange="check_extension(one)"
Here one is the Node with the id "one", one is not the string "one"
document.getElementById("$field_id");
Even if $field_id is the id "one", "$field_id" is a different string
So getElementById("$field_id") will give you the node with id "$field_id", not the node with id "one".
Fixes
onchange="check_extension('one')"
and
document.getElementById($field_id)
Also I discourage naming string variables with a leading $