i have function to make character in lowercase if a text is in uppercase
i am calling
but whenever i type anything withing typed text for eg. if the textbox already have string "texttextte xt" n if i try to modify the middle character then on upperCase function call the the function male the character to lowercase in then cursor position goes to end of the text... so i am not able to type anything in the middle... so what is the option to preserve the cursor position at it is which was befor..
Code:
function upperCase(x) { try { var y=document.getElementById(x).value; document.getElementById(x).value=y.toLowerCase(); } catch(Error) { } }
i am calling
Code:
<asp:TextBox ID="txtUrl" Width="450px" runat="server" Wrap="true" onkeyup="upperCase(this.id)" TextMode="MultiLine"></asp:TextBox>
but whenever i type anything withing typed text for eg. if the textbox already have string "texttextte xt" n if i try to modify the middle character then on upperCase function call the the function male the character to lowercase in then cursor position goes to end of the text... so i am not able to type anything in the middle... so what is the option to preserve the cursor position at it is which was befor..
Comment