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
MMA_FORCEMMA_FORCE 

How to call a javascript function in VF???

Hi:

   I have a javascript function in my Static Resource.. Now in my VF page I called it by:

 

<apex:page standardController="SFDC_520_Quote__c" extensions="salesQuotes" showHeader="false" sidebar="false" tabStyle="SFDC_520_Quote__c" renderAs="PDF"> <style> h2 {color: #dddddd; font-size: 24px; } .teststyle {color: #ff3300;} </style> <apex:includeScript value="{!URLFOR($Resource.Formatnum)}"/>

 Now The function insde the javascript.js is addCommas(nstr)

How do I call it now?

Thanks

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Venkat PolisettVenkat Polisett

Some thing like this!

 

<apex:commandButton value="Calls a JS Function" onClick="addCommas('xyz');"/>

 

 

Message Edited by Venkat Polisett on 04-30-2009 09:46 AM