I have a html element:
<div id="myElement" class="someClass" onclick="setText(this.innerHtml)" runat="server">text</div>
I want to be able to change this element on the client side using some jquery like so:
function setText(text) {
$(".someClass").text(text);
}
--OR--
function setAttribute(text) {
$(".someClass").attr("myAttr",text);
}
Once I do this I want to grab this element's new text or new attribute and then store the value of either or, server side. I should note that I then postback to the server using a LinkButton. It is at this time that when I look at the element the default text is still present or the new attribute I added is missing.
Can someone explain why the element does not get updated on the server and how I can get it too?