This is my first post here, please be nice . Im working on an asp.net page which has the following textbox:
<asp:TextBox id="txtQuickComment" class="contact" runat="server" style="width:300px; height:25" Rows="3" MaxLength="250" TextMode="MultiLine"></asp:TextBox>
I then have an image placeholder defined as follows:
var smiley = smileyName.toString();
var txt = document.getElementById("txtQuickComment");
The function above alerts "null". Is this to say the textbox does not exist? Strange. What i wish to do is to modify the function to append a string to the textbox's contents.
getElementById will return null if the HTML node was not found, check the source and make sure you really have an element with that id. Maybe .NET adds something to the id? JSF does.
You are passing a String to the function, so why call a toString method on it?
Thanks gents...suggestions seem to work!
As you already have a thread for this issue, I am going to close this one and redirect you over there. Thanks.