You need to sign in to do that
Don't have an account?
Uves
Using JQuery to extract <apex:inputTextarea> Value
I am trying to use JQuery to extract value I have entered into my InputTextArea. I have tried few JQuery quotes and I always get the same error "undefined"
VisualForce Code
JQuery Code
I have tried all the above JQuery Syntax but unfortunatly it doesn't return the value I enter into my inputTextArea.
Any help would be appertiated.
Thanks
VisualForce Code
<div id="email" class="ff-form"> <div class="ff-formtitle">Email</div> <div> <apex:pageBlock mode="view" id="pb"> <apex:pageBlockSection columns="1" id="pbs"> <apex:pageblocksectionitem > <apex:outputLabel value="Email Body : " for="ebody"/> <apex:inputTextarea id="eBody" value="{!emailbody}" rows="9" cols="50" richText="true"/> </apex:pageblocksectionitem> </apex:pageBlockSection> </apex:pageBlock> </div> </div>
JQuery Code
console.log(jQuery('input[id$="subject"]').val()); console.log(jQuery('input[id$="eBody"]').val()); console.log(jQuery('input[id$="eBody"]').html()); console.log(jQuery('input[id$="eBody"]').text()); console.log(jQuery('inputtextarea[name="eBody"]').val()); console.log(jQuery('inputtextarea[name="eBody"]').html()); console.log(jQuery('inputtextarea[name="eBody"]').text()); console.log(jQuery('textarea[name="eBody"]').val()); console.log(jQuery('textarea[name="eBody"]').html()); console.log(jQuery('textarea[name="eBody"]').text());
I have tried all the above JQuery Syntax but unfortunatly it doesn't return the value I enter into my inputTextArea.
Any help would be appertiated.
Thanks
All Answers
It's better to do this: