My name is Manuel, I am a web design student and am starting to take my first steps with web design. Recently I tried to validate

this site:


I used the W3C validator, at first I found about 30 errors, and can correct them all except one that says: 'there is no attribute


Apparently not support XHTML onload tag, and I use a Joomla extension called Vertical Menu using onload. This is a free extension and works well but I have found it has some bugs, especially when validating the website.

This is the PHP code for extension:

if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
$database = & JFactory::getDBO();
$menutype = $params->get( 'menutype', 'mainmenu' );
$qry = "SELECT id, name,parent, link,type,browserNav FROM #__menu WHERE menutype = '".$menutype."' AND published = 1 ORDER BY ordering";
$rows = $database->loadObjectList();

if(isset($GLOBALS['vertical_menu'])) $GLOBALS['vertical_menu']++;
else $GLOBALS['vertical_menu'] = 0;

function getMenuChildList($rows, $parentId) {
$childRows = array();
foreach ($rows as $row) {
if ($row->parent == $parentId) {
$childRows[] = $row;
return $childRows;

function drawVerticalMenu($rows, $showsubcats, $parentId = 0) {
$categories = $showsubcats || !$parentId ? getMenuChildList($rows, $parentId) : array();
if ($parentId) {
if (!count($categories)) {
echo '<td class="right"></td></tr>';
} else echo '<td class="arrow">';
echo '<table id="submenu'.$parentId.'" class="submenu" border="0" cellspacing="0" cellpadding="0">';
} else echo '<table id="VerticalMenu'.$GLOBALS['vertical_menu'].'" class="VerticalMenu" border="0" cellspacing="0" cellpadding="0">';
echo '<tr class="border"><td class="topleft"></td><td class="border"></td><td class="topright"></td></tr>';
foreach ($categories as $category) {
$link = $category->link. (preg_match("/^http:\/\/|^https:\/\//",$category->link)? "" : '&Itemid='.$category->id);
$blank = $category->browserNav? ' target="_blank" ' : ' ';
echo '<tr id="menu'.$category->id.'" class="menu"><td class="left"></td><td class="center"><a'.$blank.'href="'.$link.'">'.$category-

drawVerticalMenu($rows, $showsubcats, $category->id);
echo '<tr class="border"><td class="bottomleft"></td><td class="border"></td><td class="bottomright"></td></tr></table>';
if ($parentId && count($categories)) echo '</td></tr>';

$document = &JFactory::getDocument();
<style type="text/css">
div#MenuContainer'.$GLOBALS['vertical_menu'].' table#VerticalMenu'.$GLOBALS['vertical_menu'].' {
width: '.$params->get('categorymenu_width', 150).'px;
opacity: '.$params->get('categorymenu_out', 0.8).';
FILTER: progidXImageTransform.Microsoft.Alpha(Opacity='.($params->get('categorymenu_out', 0.8)*100).');
echo '<div id="MenuContainer'.$GLOBALS['vertical_menu'].'">';
drawVerticalMenu($rows, $params->get('show_subcats', 1));

echo '<img src="modules/mod_vertical_menu/images/center.gif" style="display:none" onload="new WW.VerticalMenu({out : '.$params->get('categorymenu_out',

0.8).',over : '.$params->get('categorymenu_over', 1).',duration : '.$params->get('categorymenu_fade', 300).',id : '.$GLOBALS['vertical_menu'].',width :

'.$params->get('categorymenu_width', 150).'});" alt=""/>';
echo '</div>';


The problem is at the end:

echo '<img src="modules/mod_vertical_menu/images/center.gif" style="display:none" onload="new WW.VerticalMenu({out:'.$params-> get (' categorymenu_out ', 0.8). 'over'. $ params-> get ('categorymenu_over', 1). ', duration:'. $ params-> get ('categorymenu_fade', 300). ', id:'. $ GLOBALS ['vertical_menu' ]. ', width:'. $ params-> get ('categorymenu_width', 150). '}); "alt =" "/>';
echo '</ div>';

I think the extension uses the onload event to display the sub-menus when the user moves the mouse pointer over it.

What I want is to replace the onload with other event handler or some other label that is supported by XHTML and that is as similar to onload.

I would appreciate your help ...