1

This the VF page code :

<script>    

              $(document).ready(function() {

            // SUCCESS AJAX CALL, replace "success: false," by:     success : function() { callSuccessFunction() }, 
            jQuery("#formID").validationEngine({ 
           });                                  
         }); 

</script>
<script>
          function maskvalidation(){
          var sr=navigator.appName;
        <!-- if(sr!="Microsoft Internet Explorer")-->

                           $.noConflict();        
                          $(function() {
                          $("#CPF_Web_c").mask("999.999.999-99");             
                          }); 
                          $(function() {
                              $("#Phone").mask("9999999999"); 
                              $("#ContactMobile").mask("(99)99999-9999");                         
                          });

        }
</script>
<script>
  function cpfreturn(){


       var strg1=document.getElementById("Endereço").value;
      // var strg2=document.getElementById("Numero").value;

       //document.getElementById("Endereço").value=strg1.concat(strg2);


       var type= document.getElementById('type');
       var subject= type.options[type.selectedIndex].value;



        if(subject=="Information Request")
           {

           document.getElementById('subject').value="Information Request WebForm";

           }
       if(subject=="Complaint")
   {

   document.getElementById('subject').value="Complaint WebForm";


    }
       if(subject=="Service Request")
   {

   document.getElementById('subject').value="Service Request WebForm";


    }
       if(subject=="Other")
   {

   document.getElementById('subject').value="Other WebForm";


    }





    }
</script>

Need to do following things : 1 ) I have to use this in static resource. 2) I have to refer this static resource in VF Component 3) I have to refer the component in VF Page

1
  1. Save it and upload it as a static resource
  2. In the component add <apex:includeScript value="{!URLFOR($Resource.STATICRESOIRCENAME)}'/>

if you add it to a nested zip file, you will have to add the path to the includeScript and the documentation of the tags has all that information

1
  • My static resource zip file is 'web2caseresources'. In that after extraction,it will go to the folder like web2caseresources-->js-->ce.js From the above , how can I refer ? – ram_451 Aug 6 '15 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.