Quick AwareIM javascript link & button tip

Contains tips for configurators working with Aware IM
Post Reply
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Quick AwareIM javascript link & button tip

Post by Rennur »

Appendix D in the user guide:
All links have to call a particular JavaScript function supported by Aware IM in a special object called AwareApp, so the general format of a link is as follows:

Code: Select all

<a href=”#” onclick=”AwareApp.functionName(parameters)” >Name of the link</a>  
The above works, but it href=”#” may not always be desirable.
I have converted all my links to use href="JavaScript:void(0);" instead.
  • TEXT LINK

Code: Select all

<a href="JavaScript:void(0);" OnClick="AwareApp.functionName(parameters)”">My Text Link</a>

  • BUTTON - href not required for buttons

Code: Select all

<button onClick="AwareApp.startProcessFromForm ('myProcessName','main', this, false)" type="button" class="" role="button">My Button</button>
PS: All salesforce.com links calling javasript use this method

Tip found at
http://bit.ly/1kVnbZy

Cheers
Post Reply