1

I am using jHtmlArea in 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?

Dyapa Srikanth
  • 1,231
  • 2
  • 22
  • 60

1 Answers1

1

This will update the textarea

$("#nameoftextarea").htmlarea("updateTextArea");

So you can read it out with

$("#nameoftextarea").val();
Kapitán Mlíko
  • 4,498
  • 3
  • 43
  • 60
Daj Shung
  • 39
  • 5