Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2007, 10:34 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default DHTML Menu...

code is as below:
------------------------------
<table class="mainmenu" id="mainmenu" cellpadding="0" cellspacing="0" border=0 width="450">
<tr>
  <td class='menutitle'>|</td>
  <td class='menutitle' onmouseover="changecolorOn(this);showmenu('Guideli nes','7','163')" onmouseout="changecolorOut(this);hidemenu('Guideli nes')" align="center" >Guidelines

       <table class="menu" id="Guidelines" width="112" border="0" align="left">
             <tr><td onclick="ShowPg('Guidelines.html')" onmouseover="changecolorOnS(this)" onmouseout="changecolorOutS(this)">View Guidelines</td></tr>
             <tr><td onclick="ShowPg('ratings.html')" onmouseover="changecolorOnS(this)" onmouseout="changecolorOutS(this)">Rating</td></tr>
       </table>
  </td>
<td></td>
  <td class='menutitle' onmouseover="changecolorOn(this);showmenu('Apprais al','93','163')" onmouseout="changecolorOut(this);hidemenu('Apprais al')" align="center" >Self-Appraisal
       <table class="menu" id="Appraisal" width="112" border="0" align="left">
             <tr><td onclick="ShowPg('Sec1.asp?mode=view')" onmouseover="changecolorOnS(this)" onmouseout="changecolorOutS(this)">Form</td></tr>
             <tr><td onclick="ShowPg('Behavior.asp?mode=view')" onmouseover="changecolorOnS(this)" onmouseout="changecolorOutS(this)">Behavior Rating</td></tr>
       </table>
  </td>
---------------------------

But the issues is that if changed resolution the submenu appears at different location ( a bit away from where it should be...)
what i m trying is to show submenu on the basis of the current menu item i.e. <TD> tag..will pas td element to javascript function and that function will detect height - width - left - right of <td> element and show submenu acoordingly...the current javascript is like....
-------------------
function showmenu(elmnt,lt,tp)
{
document.getElementById(elmnt).style.visibility="v isible"
document.getElementById(elmnt).style.left=lt;
document.getElementById(elmnt).style.top=tp;
}
----------------------
which should be like...
-------------------
function showmenu(elmnt,eleTD)
{
document.getElementById(elmnt).style.visibility="v isible"
document.getElementById(elmnt).style.left=eleTD.le ft;
document.getElementById(elmnt).style.top=eleTD.top + eleTD.height;
}
----------------------
but can't figureout this......
Any blast in mind?????

Thanks...



Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
 
Old January 15th, 2007, 11:56 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hai,
why don't you try css menu bar,
http://alistapart.com/articles/horizdropdowns
http://alistapart.com/d/horizdropdowns/horizontal.htm

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
 
Old January 16th, 2007, 08:49 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

This is one is fine...but surndran, i m looking for a vertical manu....any idea how do i convert this horizontal menu into vertical style???

Thanks in advace.

Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
 
Old January 17th, 2007, 06:13 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi rupen,
see this sample, is it ok?
http://tutorials.alsacreations.com/d...orizontal2.htm
http://tutorials.alsacreations.com/deroulant/

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
DHTML Treeview deepak.vasudevan Wrox Book Feedback 0 September 2nd, 2005 04:58 AM
DHTML Menu. rupen HTML Code Clinic 5 July 20th, 2005 05:01 AM
javascript menu DHTML? drop-down crmpicco Javascript How-To 6 March 14th, 2005 12:58 PM
Can you use XSLT with DHTML? bekim XSLT 4 June 9th, 2004 11:15 AM
Where's That DHTML forum? Ben Horne Forum and Wrox.com Feedback 2 March 4th, 2004 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.