Posts

Showing posts from January 11, 2015

Show and Hide Text Box Based on Selected Picklist Value using Jquery

<html>   <head>      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>      <script type="text/javascript">      $(document).ready(function() {      $('#types').change(function(){      if($('#types').val() === 'Other')         {         $('#other').show();          }      else        {         $('#other').hide();            }      });      });      </script>      </head>         <body>           <select id="types" name="types" >       <option value="Type 1">Type 1</option>       <option value="Type 2">Type 2</option>       <option value="Type 3">Type 3</option>       <option value="Other">Other</option>      </select>           <input type="text" id

On CheckBox: Value Populate from On Text box to Other Using Jquery

 <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>  function switchpartnumber(switchpartnoid)         {             try {                 alert(switchpartnoid);                 if(document.getElementById(switchpartnoid).checked == true){                     var switchpartno = $(".InputtestClass").val();                     $(".outputtestClass").val(switchpartno);                        }             } catch (e) { alert('Internal Error!'+e) }                      } </script>  <apex:inputField type="CheckBox"onchange="switchpartnumber(this.id);">  <apex:inputField styleClass="InputtestClass" />  <apex:inputField styleClass="outputtestClass"/>