+ Start a Discussion
Aswin B SAswin B S 

Accessing value from custom component in javascript of vf page


I have a custom component which provides lookup records based on the value entered. It is used in vf page inside a form. How can I fetch the value selected in the custom controller in my vf page javascript as soon as a value is selected.


Here is the outline of code
<script> Need the value here </script>
ShirishaShirisha (Salesforce Developers) 
Hi Aswin,


Please find the example code in the below thread to refer the field from the Component.


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Aswin B SAswin B S

Hi Shirisha,

Thanks for sharing the code. But the example code shows how to pass a value to the component. My page and component uses different controller. I am looking a way to pass a value from component to the controller of my page.


asdag sdfrasdag sdfr
I'm facing the same problem in my account. Thanks for asking it I have applyeid the above code in my blog (https://bowsguide.com/best-bow-string-stop/) and its working fine now.