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)

Monday 9 February 2015

Hide dropdown values using jquery

<apex:page id="pageId" standardController="Case">

<html>
<head>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />
<script>
$(document).ready(function(){

//alert('Hello'+document.getElementById('00Nf0000000uXUX').value);
    $( "#00N40000002IC8J option[value=Sonic]" ).wrap( "<span>" );
   $( "#selectlist option[value=4]" ).wrap( "<span>" );
});
</script>
</head>
<body>

<select id="selectlist" name="selectproduct" >
<option value=""> --- Select product  --- </option>
<option value="Actional">Product 1</option>
<option value="2">Product 2</option>
<option value="3">Product 3</option>
<option value="4">Product 4</option>
</select>
<input id="mytext" type="text" value="dgdfbg"/>

</body>
</html>

</apex:page

No comments:

Post a Comment