Difference between revisions of "Savefunc"

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
 
You can use '''savefunc''' to create a custom [[Browser Script]] that runs whenever a record is saved or submitted.
 
You can use '''savefunc''' to create a custom [[Browser Script]] that runs whenever a record is saved or submitted.
 +
 +
'''Instructions:'''
 +
* Create a [[Custom Field]] on the page of type: [[Custom Field Type: Special – Browser Script]]
 +
* Include a function in the [[Browser Script]] called '''savefunc''' that includes the [[JavaScript]] you wish to execute when the record is either saved or submitted.
  
  
 
'''Example:'''
 
'''Example:'''
 
<pre>
 
<pre>
//this function runs when save is clicked. It runs the AddActivity script prior to the save/submit.
+
//this function runs when save/submit is clicked. It runs the AddActivity script prior to the save/submit.
 
function savefunc()
 
function savefunc()
 
{
 
{
Line 13: Line 17:
  
  
[[Cateogry:JavaScript]]
+
[[Category:JavaScript]]

Revision as of 11:05, 31 July 2009

You can use savefunc to create a custom Browser Script that runs whenever a record is saved or submitted.

Instructions:


Example:

//this function runs when save/submit is clicked. It runs the AddActivity script prior to the save/submit.
function savefunc()
{
AddActivity()
}