html5 - Javascript set value of an input field -


since while cannot set value of input field type=text. before, used this:

<input style="display: none" type="text" name="geo_poi" value="" id="geofeld" /> 

then, in javascript added code containing line this:

document.getelementbyid("geofeld").value = geo_poi; 

this worked. maybe new browsers don't want support method above anymore.

so using following method setting attributes worked fine.

document.getelementbyid("geofeld").setattribute("value", geo_poi); 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -