Friday, October 17, 2014

Bar code

How to generate Bar code. Following VF Page code.   



<apex:page standardController="Contact">
<apex:includeScript value="{!$Resource.BCO}"/>
<apex:detail relatedList="false"></apex:detail>
 <br/>
    <br/>
     <div id="inputdata">{!Contact.Id}</div>
    <div id="externalbox" style="width:5in"></div>
    
    
    <script type="text/javascript">
    /* <![CDATA[ */
      function get_object(id) {
      alert('Executed');
       var object = null;
       if (document.layers) {
        object = document.layers[id];
       } else if (document.all) {
        object = document.all[id];
       } else if (document.getElementById) {
        object = document.getElementById(id);
       }
       return object;
      }
      get_object("inputdata").innerHTML=DrawCode39Barcode(get_object("inputdata").innerHTML,1);
     /* ]]> */
    </script>

    
  
</apex:page>

No comments:

Post a Comment