If you click on the \"Hide\" button, I will disappear.

When I click on hide button, it hide that field for a movement and again it appears automatically. I think the page is getting refreshed or something else Please provide me the solution.", "answerCount": 1, "upvoteCount": 0, "datePublished": "2015-02-25T09:17:35.000Z", "author": { "@type": "Person", "name": "Jetharam Choudhary", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000B0ztZAAR", "affiliation": { "@type": "Organization", "name": "--" } }, "acceptedAnswer": { "@type": "Answer", "text": "Hi Jetharam,   Please post this question in one of the developer forums for a quick response, this forum is more focussed towards the declarative side of things.   https://developer.salesforce.com/forums/#!/feedtype=RECENT&criteria=ALLQUESTIONS   http://salesforce.stackexchange.com/", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7zYJSAZ", "datePublished": "2015-02-25T09:32:29.000Z", "author": { "@type": "Person", "name": "Sunil Sarilla", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000AJ82FAAT", "affiliation": { "@type": "Organization", "name": "M&G Investments" } } }, "suggestedAnswer": [] } }
Skip to main content
I m trying to hide a picklist field in below Sample code:

 

<apex:page showheader="true" standardController="Merchandise__c">

 

<head>

 

<apex:includeScript value="{!$Resource.JqueryMin}"  />

 

<script>

 

   $j = jQuery.noConflict();

 

   $j(document).ready(function() {

 

   $j("#.hide").click(function(){

 

        $j("#.inpi").fadeOut('slow');

 

    });

 

    $j("#.show").click(function(){

 

        $j("p").show();

 

    });

 

   });

 

</script>

 

</head>    

 

  

 

<body>

 

<apex:form >

 

<div id="inpi">

 

<apex:inputField value="{!Merchandise__c.PickList1__c}" />

 

</div>

 

<p>If you click on the "Hide" button, I will disappear.</p>

 

<button id="hide">Hide</button>

 

<button id="show">Show</button>

 

</apex:form>

 

</body>

 

</apex:page>

 

When I click on hide button, it hide that field for a movement and again it appears automatically.

 

I think the page is getting refreshed or something else

 

Please provide me the solution.

 

 
1 answer
0/9000