I have an ASP:textbox on a page with various controls and divs, where I am setting the style to position:absolute on the "onkeyup" event. The height of the textbox increases dynamically based on the characters entered, but the issue is that the textbox always stays in a fixed position when the user scrolls up or down the page. On the "onblur" event, I change the style back to its default, but it still moves with the scroll when the focus is on the textbox.
<asp:TextBox ID="txtComment1" runat="server" Height="13px" Width="99%" MaxLength="40" TextMode="MultiLine"
onkeyup="SetHeight(this)" onblur="Blur(this)"></asp:TextBox>
<script type="text/javascript">
//SetHeight function changes the style to position:"absolute"
function SetHeight(textbox) {
textbox.style.height = "14px";
textbox.style.position = "absolute";
textbox.style.width = "49%";
}
//Blur function resets the style to default
function Blur(textarea) {
textarea.style.height = "14px";
textarea.style.position = "";
textarea.style.width = "99%";
}
</script>
P.S. : I have tried HoverMenuExtender but still facing the same issue