Unable to access jHtmlArea value in firefox
I am using jHtmlArea in开发者_JS百科 my application. I need to validate the textarea value whether it is empty or not, for that i wrote a function which is going to be called onclick event of the submit button.
function x(){
alert($('#txtDefaultHtmlArea').val());
}
here alert box is not showing correct value. After every 2 clicks of the submit button only it is showing actual text, before that it is showing previous one. All this happened in Firefox only. It is working in chrome.
What is the problem?
This will update the textarea
$("#nameoftextarea").htmlarea("updateTextArea");
So you can read it out with
$("#nameoftextarea").val();
精彩评论