Activity Forums Salesforce Questions and Answers State ways to get the field value of components to Salesforce VF page through JavaScript?

  • State ways to get the field value of components to Salesforce VF page through JavaScript?

  • Bharat Singh Lodhi

    Member
    January 4, 2019 at 5:43 pm

    Hi,

    Is there any way to get the field value of Visualforce component to Visualforce page through JavaScript?

    Thanks

  • Jade

    Member
    January 11, 2019 at 8:35 am

    Hi Bharat,

    Give the field an Id, ultimately the whole Visualforce which will have a visualforce component will be rendered as an HTML. Use JavaScript or JQuery to get the value of the field using the ID.

    Javascript:

    document.getElementById('yourTagID').value;

    JQuery:

    $('#youTagId').val();

    Hope this will be helpful.

    Thanks

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos