Jaxcent support can be easily added to CSS and/or JavaScript based menus.

This samples shows the addition of Jaxcent to two menu systems:

  • Tigra from Soft Complex (at the top)
  • Slide-In Menu bar from Dynamic Drive (at the left, move mouse over it to see menu.)
A calendar sample is also available at http://www.jaxcent.com/samples/MoreSamples.html.

JavaScript and/or CSS based menus typically provide instructions on customizing the menu. These can usually be followed even by people not familiar with CSS or JavaScript.

During these customization instructions, at some point, a link for the menu must be provided. Usually, this will be of the form

    http://www.somedomain.com/somelink.html
To invoke Jaxcent, simply put in the following link instead
    javascript:JaxcentServerRequest('Some.Link');
replacing 'Some.Link' with some appropriate string.

On the Jaxcent side, override the onJavaScriptRequest of the JaxcentPage class, to retrieve the string passed in from the JavaScript side. You can provide more than one arguments in the javascript call. Additional arguments will be provided as a String-array on the Java side.

The Java code that handles this page is provided below:


package sample;

import jaxcent.*;

public class MenuSample extends jaxcent.JaxcentPage {

    protected void onJavaScriptRequest(java.lang.String cmd, java.lang.String[] args)
    {
        showMessageDialog( "Server received cmd: " + cmd );
    }
}