htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
How to get htmlarea's value within javascript code?


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


bloodworth
New User

Feb 20, 2005, 5:26 AM

Post #1 of 1 (32252 views)
Shortcut
How to get htmlarea's value within javascript code? Can't Post

Hi I want to make sure the htmlarea is not empty within js code. (check when submits form). Here is the code I use to submit form:
<form name="frm" ....>
<textarea id="ta" name="ta" cols="10" rows="10"></textarea>
<input type="button" name="btnSubmit" value="Submit" onclick="submit_frm(frm)">
</form>

js code:
function submit_frm(frm)
{
if(frm.ta.value=='')
alert('Please input text');
else
frm.submit();
}


This code works ok before applied HTMLArea, but after I replace textarea with HTMLAlea, the frm.ta.value is alway empty. It seems I need to sync the textarea with htmlarea first? Or is there a way to get htmlarea's value in javascript directly.

 
 
 


Search for (options)