0

My strength is not in Javascript. My "simple" mountain to climb right now is to get the value of the input! I keep getting "undefined"!

Input element in the form is:

<input name="Address" type="text" maxlength="255"  id="Address" class="required address"  onchange="detectPO();" />

My script so far is:

<script>
function detectPO() { 
    var StreetAddress = document.getElementById('Address').value;
    console.log("You entered: " + StreetAddress);
}
</script>

I've scoured dozens of similar sounding questions on here, and searched on google. I'm really trying. Based on all I've read, this should work, no? But it does not. Tried console in both Chrome and FF.

Can anyone help me? Much appreciation for all efforts.

0 Answers0