You need to sign in to do that
Don't have an account?
WEN JIE
How to get textarea value by js on vf
Hi,
I have a field as a rich textarea. I use inputField display this field on my vf page. But I don't know how to get the value by js or jquery. And I foung this is an iframe generagte automatically when I check the page source.
Does anyone knows this?
Thank you!
<apex:page>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> // invoke jQuery
<script>
alert( $('[Id $= "Your_text_area_Id"]').val()) ; // alerting the value of text area
</script>
</apex:page>
Can you post the source.
If you can add a style class to the field, then you can retrieve the value like this:
Using Ids in jQuery doesnt really work in Salesforce as the IDs change based on the containers. so it will turn into something like j_id0:j_id2:textField