First, export the configuration file: system settings --> Custom --> export custom items to export the isV configuration (isV. config)
<? XML version = "1.0" encoding = "UTF-8" ?> < Isvconfig > < Configuration Version = "3.0.2.16.0" > < Entities > <! -- Object Name-Object Name --> < Entity Name = "Account" > <! -- Menu --> < Menubar > <! -- Custom menus that you may add --> </ Menubar > <! -- Toolbar Section --> <! -- Validforcreate-validforupdate effective upon creation-effective upon update --> < Toolbar Validforcreate = "0" Validforupdate = "1" > <! -- Button Section --> <! -- Icon-button icon passparams-whether to pass the system's default parameters (typename, type, ID, orgname, userlcid, orglcid) --> <! -- Winmode-new window mode (0-Window 1-Modal Dialog 2-modeless DIALOG) JavaScript-script to be executed, usually the method name --> <! -- Winparams-the specific usage of special parameters has not been studied URL-open pages, usually select either of them with JavaScript Parameters --> < Button Icon = "/_ IMGs/ico_18_debug.gif" Passparams = "1" Winparams = "" Winmode = "0" URL = "" Javascript = "Uptoheadcompany ();" > < Titles > < Title Lcid = "2052" Text = "My buttons" /> </ Titles > < ToolTips > < Tooltip Lcid = "2052" Text = "My buttons" /> </ ToolTips > </ Button > </ Toolbar > <! -- Left Navigation --> < Navbar > < Navbaritem Icon = "/_ IMGs/ico_16_4.gif" URL = "About: blank" ID = "Navitem" > < Titles > < Title Lcid = "1033" Text = "My menu" /> </ Titles > </ Navbaritem > </ Navbar > <! -- List page related --> < Grid > <! -- Menu Bar --> < Menubar > < Buttons > < Button Icon = "/_ IMGs/tools/ico_contract_template.gif" Javascript = "Alert (1 );" > < Titles > < Title Lcid = "1033" Text = "My menu" /> </ Titles > < ToolTips > < Tooltip Lcid = "1033" Text = "My menu" /> </ ToolTips > </ Button > </ Buttons > </ Menubar > </ Grid > </ Entity > </ Entities > </ Configuration >
Button events can also be dynamically bound to the onload event of the form.
For(VaRIndexInDocument. getelementsbytagname ("Li")){If(Document. getelementsbytagname ("Li") [Index]. Title = "my buttons") {Document. getelementsbytagname ("Li") [Index]. onclick =Myevent;Break;}}
Save the file and import the custom object (system Settings> Custom> import custom items, browse> upload> import the selected custom items)
Refresh the page to see the effect