I am trying to create a dynamic menu on the left column of <!-- m --><a class="postlink" href="http://alexandivy.com/jsafro/overstock_v2/webpages/index.php">http://alexandivy.com/jsafro/overstock_ ... /index.php</a><!-- m -->?
When a user clicks one of the categories in the left column, the subcategories are displayed. I would like to open (and close) the subcategories onMouseOver (and onMouseOut).
Each category has an onMouseOver calling the following function:
function open_nav_child( cat_id )
{
document.getElementById( 'nav_cat_' + cat_id + '_child' ).style.display = 'block';
}
This works... sorta. Only one line of the subcategory is being displayed onMouseOver.
What do I need to do to display all the lines of the subcategory?
Is there a better way to do this?Funny how many problems are really between the keyboard and the chair
I wrote the html as:
<div class='nav_cat' onMouseOver='open_nav_child(48);' onMouseOut='close_nav_child(48);'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48'>Area Rugs</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=794'>Large</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=796'>Runners</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=795'>Small</a>
</div>
when it should have been:
<div class='nav_cat' onMouseOver='open_nav_child(48);' onMouseOut='close_nav_child(48);'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48'>Area Rugs</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=794'>Large</a><br>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=796'>Runners</a><br>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=795'>Small</a><br>
</div>
When a user clicks one of the categories in the left column, the subcategories are displayed. I would like to open (and close) the subcategories onMouseOver (and onMouseOut).
Each category has an onMouseOver calling the following function:
function open_nav_child( cat_id )
{
document.getElementById( 'nav_cat_' + cat_id + '_child' ).style.display = 'block';
}
This works... sorta. Only one line of the subcategory is being displayed onMouseOver.
What do I need to do to display all the lines of the subcategory?
Is there a better way to do this?Funny how many problems are really between the keyboard and the chair
I wrote the html as:
<div class='nav_cat' onMouseOver='open_nav_child(48);' onMouseOut='close_nav_child(48);'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48'>Area Rugs</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=794'>Large</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=796'>Runners</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=795'>Small</a>
</div>
when it should have been:
<div class='nav_cat' onMouseOver='open_nav_child(48);' onMouseOut='close_nav_child(48);'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48'>Area Rugs</a>
</div>
<div class='nav_sect' id='nav_cat_48_child'>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=794'>Large</a><br>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=796'>Runners</a><br>
<a href='http://www.webdeveloper.com/forum/archive/index.php/index.php?category_id=48§ion_id=795'>Small</a><br>
</div>