Click here to Skip to main content
15,886,817 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
$(document).ready(function () {
$("input").keydown(function () {
$("input").css("background-color", "yellow");
});
$("input").keyup(function () {
$("input").css("background-color", "pink");
});
});

this script is working for all my textboxes .. and then i add this

<asp:TextBox ID="txtMultiLine" runat="server" Height="250px" Width="100%" Style="background-color: #FFF; display: inline;" TextMode="MultiLine" AutoCompleteType="Enabled" >

Textbox "txtMultiLine" is not being affected by the script.

then i add another script.
function tagKeyWord() {
alert("yes");
}

and this is running for all the textbox that i added an onkeypress="tagKeyWord()" including Textbox "txtMultiLine" ..

and then i added ..
<asp:HtmlEditorExtender ID="txtHTMLContentArea_HtmlEditorExtender" runat="server" Enabled="True" TargetControlID="txtHTMLContentArea">

and then Textbox "txtMultiLine" onkeypress event doesn't trigger .

What will i do??
HtmlEditorExtender and the textbox being multiline is important. So I must find a way that my script function keypress running on a multiline Textbox with HtmlEditorExtender.

Any form of help is highly appreciated.
Regards.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900