Skip to main content

Adding a JavaScript Link

Next, we add a JavaScript hyperlink to HomePage.cls. When the user clicks the link, the page displays an empty form with which the user can create and save a new contact. Place the following code immediately below the tableNavigator component.


 <link align="left" caption="new contact" href="javascript:zenPage.newContact();"/>  
    

Note the value of the href attribute. It specifies that by clicking the link, the user invokes the JavaScript newContact method. We add this function to the HomePage.cls on a subsequent page of the tutorial.

FeedbackOpens in a new tab