I have textarea in my MVC application where I implement AspNetSpellCheck , the debugger tells me that textarea changing to display: none; visibility: hidden; display: none; visibility: hidden; and a div generated using id="abc" and class"="pqr" .
<input type="hidden" value="" name="userid" id="useid" />
I also implement change detection for all text areas and other controls ....
var somethingChanged = false; $(document).ready(function() { $('input').change(function() { somethingChanged = true; }); });
As the text area becomes hidden, I assume that it does not automatically trigger the change() event. What is the solution to trigger the event in the above case? Thank you
EDIT
Using AspNetSpellCheck below is the code,
@{ ASPNetSpell.Razor.SpellAsYouType mySpell = new ASPNetSpell.Razor.SpellAsYouType(); mySpell.InstallationPath = ("/Content/ASPNetSpellInclude"); mySpell.FieldsToSpellCheck = "TextArea1"; } <textarea id="TextArea1" cols="20" rows="2">bedddly</textarea> @Html.Raw(mySpell.getHtml()) <script type="text/javascript" language="javascript"> $(document).ready(function () { $('input[type="hidden"]').change(function () { debugger; alert('hi'); </script>
The debugger produces below code, a hidden text area and a new DIV construct,
<div tabIndex="null" class="livespell_textarea" id="TextArea1___livespell_proxy"> <textarea id="TextArea1" style="display: none; visibility: hidden;" rows="2" cols="20">
user584018
source share