Apycom Software Home

javascript tips  

  Menus Tuner
 · Live Examples
 · Screen Shots
 · Purchase
 · Download

Javascript Menu
DHTML Javascript Menu

Web Buttons! Superior Vista/XP html buttons and html menus!
Superior Vista/XP html buttons and html menus!

LightBox Web Photo Gallery - 
Create AJAX-powered web image gallery with ease!
Web Photo Gallery Maker Lightbox!

XP Drop Down Menu
Drop Down Menu
Animated Buttons
Navigation Bar Tabs
Flash Menu Buttons
Pulse Buttons
Image Fade Menu
Flash Blur Menu
Spin Menu
Trail Menu
Lake Menu
Transition Menu
Falling Letters
Leaping Letters
Stretch Menu
Image Web Buttons
Website Buttons
jQuery Menu
jQuery Drop Down Menu
jQuery DropDown Menu
jQuery Menu Drop Down
jQuery Horizontal Menu
jQuery CSS Menu
jQuery Menu Plugin
Animated jQuery Menu
jQuery Menu Slide
 · Javascript tips
 · FAQ
 · Purchase
 · Contact


JavaBoutique Top 15

Jars.com - Top25%


CNET Download.com - popular

jCay.com - 5 stars

ZDNet - 4 stars

Nonags - 5

SoftList - Editor's Choice

HotScripts - 5/5


Free PC Download jQuery Plugins


 More Menus & Buttons..
 - JavaScript Menu Maker
 - JavaScript Tree Menu
 - Ajax Table
 - DropDown Menu
 - Flash Menus
 - Html Buttons
 - Java Buttons
 - Web Page Buttons
 - Drop Down Menus
 - LightBox 2
To enable Javascript support:

* add MAYSCRIPT to the applet tag;
* place a javascript call starting with javascript: as the item link;
* set the target to "_"
as shown in the following example :
<applet code="apMenu.class" Width="125" Height="156" MAYSCRIPT>
      <param name="menuItems" value="
Javascript calls limitations

* Value and variable assignments are not supported
* Empty strings in arguments are not supported
* Use single quotes (') instead of double quotes (") for arguments
* Arguments are treated as String literals during the function call. Therefore, they must be converted to the appropriate format using standard Javascript methods such as parseInt(String) and parseFloat(String).

How to overcome it

The best way to overcome most of the limitations is placing the instructions within a javascript function:

function open_w(arg){
 if (confirm('Open a new window?') == true){
      <param name="menuItems" value="
              {Open window,javascript:open_w('index.html'),_}"> 
Dynamic menu changing

Since 2.73 version of Apycom Java Menu Applets the applets have some public function those allow to modify the menu "on fly" without the page reloading and refreshing. The following public function are available.
For Drop Down Menu, XP Drop Down Menu, Navigation Bar Tabs:
sets a new highlighted/pressed item, example: setPressedItem(3)
returns a new highlighted/pressed item, example: getPressedItem()
For Drop Down Menu and XP Drop Down Menu:
changes an item, example: changeItem('3_1_9','Apycom Home','http://www.apycom.com','_self')
Note the "number_of_item" and "index_of_item" parameters include separators.

sets a submenu checkbox item to a state difined by 'flag': 'true' checks item, 'false' unchecks it
example: setCheckbox('2_4_1','true')
returns a checkbox state, 'true' - item is in checked state, 'false' - item is in unchecked state
example: getCheckbox('2_4_1')
Note setCheckbox and getCheckbox work only with submenu items and don't work with top-level items. Also the item must defined as a checkbox in the 'menuItems' param, i.e. starts with "_V" or "_0"

How to call these functions?

To call the public functions:
* add MAYSCRIPT parameter to the applet tag;
* name an applet instance by adding name parameter;
as shown in the following example :
<applet name=myap1 code=apPopupMenu.class Width=125 Height=156 MAYSCRIPT>
* and then call the function via javascript;
for example :
<a href="javascript:document.myap1.changeItem('3_2','Text','test.html','_blank')">
Click here!</a>

Copyright (c) 1998-2010, Apycom Software