Ajax (1) Apex Class (12) Apex Trigger (2) Community (2) Home Page (1) HTML (4) Integration (3) JS (7) KB (1) Label (1) Licenses (1) Listing (1) Log (1) OOPs (5) Sharing (1) Static Resource (1) Test Class (3) URI (1) Visualforce (10)

Sunday 22 February 2015

Hiding Dropdown Values using javascript on community

Create Custom link Javacript:

{!REQUIRESCRIPT("/communityName/resource/1424668417000/krrish")}

Uploaded static resource:
Name: krrish.js
Code:
setTimeout(function(){
var optionDrop = document.getElementById("00N40000002IC8J");
for (i = 0; i < optionDrop.options.length; i++) {
  if(optionDrop[i].value=='Actional' || optionDrop[i].value=='DataXtend SI'|| optionDrop[i].value=='Savvion'||optionDrop[i].value=='Sonic'||optionDrop[i].value=='DCM'||optionDrop[i].value=='POS'||optionDrop[i].value=='ObjectStore'||optionDrop[i].value=='Other'||optionDrop[i].value=='GCE'||optionDrop[i].value=='CIS'||optionDrop[i].value=='EDI'||optionDrop[i].value=='Hosting Services')
    {
   optionDrop[i].style.display= "none";
   }
}},1000);

No comments:

Post a Comment