Friday, July 22, 2011

JQuery for hiding 'table row'/'Control' on dropdownlist selected value


Replace 'DOLLAR' with '$'


DOLLAR(document).ready(function ()
 {
 var trial1 = DOLLAR("#[idDOLLAR=_ddlWorflowStage] option:selected").text();
 if (trial1 == "Copy")
 {
 DOLLAR("#[idDOLLAR=_ROWreviewers]").show();
 DOLLAR("#[idDOLLAR=_ROWmarcomApproval]").hide();
 DOLLAR("#[idDOLLAR=_ROWlegalApprovwers]").hide();
 }
 DOLLAR("#[idDOLLAR=_ddlWorflowStage]").change(function ()
 {
 var trial = DOLLAR("#[idDOLLAR=_ddlWorflowStage] option:selected").text();
 if (trial == "Copy")
 {
 DOLLAR("#[idDOLLAR=ROWreviewers]").show();
 DOLLAR("#[idDOLLAR=ROWmarcomApproval]").hide();
 DOLLAR("#[idDOLLAR=ROWlegalApprovwers]").hide();
 }
 if (trial == "Layout")
  {
 DOLLAR("#[idDOLLAR=ROWreviewers]").show();
 DOLLAR("#[idDOLLAR=ROWmarcomApproval]").show();
 DOLLAR("#[idDOLLAR=ROWlegalApprovwers]").hide();
 }
 if (trial == "Final")
  {
 DOLLAR("#[idDOLLAR=ROWreviewers]").hide();
 DOLLAR("#[idDOLLAR=ROWmarcomApproval]").hide();
 DOLLAR("#[idDOLLAR=ROWlegalApprovwers]").show();
 }
});

No comments:

Post a Comment

Seven steps to build and deploy SPFX web part to SharePoint

Install Node.JS Use this link to install Node.JS https://nodejs.org/en/ 2.        Install yeomen and gulp CMD>npm install –g y...