How To Exchange Value Between An Input And And Asp:textbox Controler
how to use something like this : ).
<script>// .. rest of the code ...document.getElementById("<%= txt_place_name.ClientID%>").value = document.getElementById('txt_newpl').value;
</script>
Also, wouldn't be easy if you add your <asp:TextBox ... />
to the info window to be completed, like this. In this way you won't complicate your code with unnecessary exchange of values.
<asp:TextBoxID="txt_place_name"CssClass="form-control ltr"ValidationGroup="add"runat="server"></asp:TextBox><script>var tmp = document.createElement("input");
tmp.appendChild(document.getElementById("<%= txt_place_name.ClientID %>"));
google.maps.event.addListener(marker, "click", function (e) {
var infoWindow = new google.maps.InfoWindow({
content:
'<div>' + tmp.innerHTML + '</div>'
})
});
</script>
You can do this because <asp:TextBox .../>
control will be rendered to an html element <input type="text" ... />
. This render (transforming) process is happening on sever side.
Post a Comment for "How To Exchange Value Between An Input And And Asp:textbox Controler"