Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'lwest'@'' (using password: YES) in /mnt/115/sda/7/1/lwest/include/adm/stat.php3 on line 16

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/115/sda/7/1/lwest/include/adm/stat.php3 on line 18


	PHP class that generates a DHTML Popup Menu


	Download library and documentation  libpopupmenu.zip ( 3166 bytes )


	include "./libPopupMenu.php";

	$pop = new PopupMenu( "mypopup" );
	// add some items
	$pop->addItem( "Altavista", "http://www.altavista.com", "_new" );
	$pop->addItem( "Go Yahoo!", "http://www.yahoo.com", "_new" );
	$pop->addItem( "Send me a mail", "mailto:lwest@free.fr?subject=libPopupMenu" );
	$pop->addItem( "Page source", "javascript:document.location='view-source:'+document.location" );
	// defines some properties
	$pop->set( "border", 1 );
	$pop->set( "width", 80 );
	$pop->set( "margin", 3 );

	// output CSS then HTML and JS code
	// attach the popup to an Anchor
	?><a href="#" onMouseOver="<?= $pop->jsCall(); ?>">My Menu</a><?

	See Demo


PopupMenu( menuid )

	Instanciate a new popup. menuid is an identifier for the menu
	(in case you have several popup in the page).

addItem( caption, url, [target] )

	Add an item to the menu. Javascript calls are possible.

	Example: $pop->addItem( "Go Yahoo !", "http://www.yahoo.com/", "_new" );


	Add a line separator


	Outputs the HTML+JS code that "engines" the popup menu.
	one call is required.


	Returns the javascript code that opens the popup menu.
	You have to insert this in an onClick or onMouseOver event handler.

	$call = $pop->jsCall();
	<a href="#" onClick="$call">Click me</a>

Set( property, value )

	Let you change a menu property.

	Example: $pop->Set( "bgcolor", "yellow" );

	Supported properties are:

property namedescriptiondefault
widthmenu width (pixel)100
heightmenu height (pixel)100
bgcolormenu background color#C0C0C0
coloritems text colorblack
fontFamilyitems font - CSS syntax, multiple values separated by ","Helvetica, Arial
fontSizeitems font size - CSS syntax11px
alignitems text horizontal alignmentleft
marginmargin between border and menu text (pixels)2
borderborder size1
menuItemFormatformat of a menu item, as used in a printf() call(*)
	(*) advanced feature. have a look at class code before.


	Netscape Browser 4+ compatible *only*
	More customizations to come


	Version      0.4
	Licence      Free of use
	Author       Leo West <lwest@free.fr>
	Created      Sun Oct 01 23:12:04 UTC 2000
	Modified     Thu Oct 26 11:18:47 UTC 2000

Generated on Thu, 26 04 2000 15:04:38 by RFC Engine Processor - © 1998-2000 Leo West