I am using 2 button in custom tab and each button has a .js file to load . Could you please say me how to use 2 .js file in the same element .xml and here is my code for element xml
Template="Ribbon.Templates.CustomTabTemplate">
<Controls Id="Ribbon.SCustomTab.CustomTabGroup.Controls">
<Button
Id="Ribbon.CustomTab.CustomTabGroup.Button1"
Command="CustomTab.Button1"
Sequence="15"
Image32by32="/_layouts/images/DocumentTab/Button.jpeg"
LabelText="Button"
TemplateAlias="Button"/>
<Button
Id="Ribbon.CustomTab.CustomTabGroup.Button2"
Command="CustomTab.Button2"
Sequence="17"
Image32by32="/_layouts/images/DocumentTab/Button2l.jpeg"
LabelText="Button2"
TemplateAlias="Butt2"/>
</Controls>
</Group>
</Groups>
</Tab>
</CommandUIDefinition>
<CommandUIDefinition Location="Ribbon.Templates._children">
<GroupTemplate Id="Ribbon.Templates.CustomTemplate">
<Layout
Title="FiveLarge"
LayoutTitle="FiveLarge">
<Section Alignment="Top" Type="OneRow">
<Row>
<ControlRef DisplayMode="Large" TemplateAlias="Button1" />
</Row>
</Section>
<Section Alignment="Top" Type="OneRow">
<Row>
<ControlRef DisplayMode="Large" TemplateAlias="Button2" />
</Row>
</Section>
</Layout>
</GroupTemplate>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="CustomTab.Button1"
CommandAction="javascript:Convertion();"
EnabledScript="javascript:enable();"/>
<CommandUIHandler
Command="CustomTab.Button2"
CommandAction="javascript:Convertion1();"
EnabledScript="javascript:enable();"/>
</CommandUIHandlers>
</CommandUIExtension>
ScriptSrc="/_layouts/DocumentTabTwo/Button2.js"/>
Here in the above code the command action attribute of 2 buttons are having method convertion() in button 1.js file . and conversion1() methods in the button 2 .js file . Can any one say me how to add these 2 js file in element .xml Is the method which I did is correct or any changes to be made
Regards, Zakeer Ahamed.S