function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
hmoh1920hmoh1920 

Addition of javascript

hi,

 

How to add of javascript into visualforcepage(opportunity)

 

thanks.

hmoh1920hmoh1920

Hi,

 

to addition in visualforce page ( opportunity  standard visualforce page) , is not a costum page.

 

 

thanks.

kritinkritin

nothing to do more..as like you do in your HTML page you need to do in same fashion to Add javascript code in VF page.

 

like as...

<apex:page standardController="Account" extensions="OverrideNewAccountController">
    <script type="text/javascript">
    
       
 var url = "/{!$ObjectType.Account.KeyPrefix}/e?nooverride=1";
 url += "&retURL=" + escape("{!$Request.retURL}");
 
 url += "&QASnew=1";
 url += "&saveURL=/apex/experianqas__QAS_Override_New_Account_Lightbox";
 
 
 var companyName = "{!UnisonCompanyName}";
 var CompanyId = "{!UnisonCompanyId}";
   
          
    if (companyName.length > 0) {
         url += "&CF00NN0000000SRYS=" + escape(companyName);
         url += "&CF00NN0000000SRYS_lkid=" + escape(CompanyId);
       
    }
    window.top.location.replace(url);
    </script>
</apex:page>