", "answerCount": 2, "upvoteCount": 0, "datePublished": "2016-02-27T10:03:00.000Z", "author": { "@type": "Person", "name": "sandeep reddy", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000CSrhPAAT", "affiliation": { "@type": "Organization", "name": "--" } }, "suggestedAnswer": [ { "@type": "Answer", "text": "Hi Sandeep, Try changing your commandButton to this one:  ", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T4ADsSAN", "datePublished": "2016-02-27T16:20:49.000Z", "author": { "@type": "Person", "name": "Head In Cloud", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000CTIUqAAP", "affiliation": { "@type": "Organization", "name": "Head In Cloud" } } } ] } } Skip to main content
hi 

i am srinu please check it

if i click display button 

will show s  name thats what i want

<apex:page id="a" >

    <script>

    function num(){

    var branch=(type=:'painting',name=:'ramesh');

        document.getElementById('a:b:c').innerHTML=branch.name;

        alert('the branc is'+branch);

    

    </script>

    <apex:form>

        <apex:pageBlock id="b">

        <apex:inputText id="c" onclick="num" />

        <apex:commandButton  value="diaplay" reRender="d" action="{!num}" />

        <apex:outputLabel id="d"/> 

    

    </apex:pageBlock>

        </apex:form>

 

</apex:page> 
2 个回答
  1. 2016年2月27日 16:20
    Hi Sandeep,

    Try changing your commandButton to this one:

    <apex:commandButton value="diaplay" reRender="c" onclick="num();return false;" />