Results 1 to 3 of 3

Thread: AnyLink Drop Down Menu Problem

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Drop Down Menu Problem

    1) Script Title: AnyLink Drop Down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem:
    Exactly as is this script works.
    Instead of a Text link with an Anchor tag I would like to use a Cell in a table with mouseover, mouseout, and onclick events - this sounds easy enough to do but I am getting an error when I do that:

    I left code in header exactly as described on page above... I linked using this code:

    -----------------------------------------------------------------
    <table border="0" width="100%" id="table1" bgcolor="#336666">
    <tr><div id="menu1">
    <td align="center" bgcolor="#F2EBE3" onmouseover="FP_callJS('dropdownmenu(this, event, menu1, \'150px\')')" onmouseout="FP_callJS('delayhidemenu()')" onclick="FP_callJS('return clickreturnvalue()')">
    <b><font face="Arial Narrow" size="2">SAMPLE1</font></b></td></div>
    <td align="center" bgcolor="#F2EBE3"><b>
    <font size="2" face="Arial Narrow">SAMPLE LINK 2</font></b></td>
    <td align="center" bgcolor="#F2EBE3"><b>
    <font face="Arial Narrow" size="2">ONE MORE SAMPLE</font></b></td>
    </tr>
    </table>

    -----------------------------------------------------------------
    The error is an invalid object on this line of code:

    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Don't use FP_callJS(). And you don't need the onclick, all that does is cancel the default onclick, but there is no default onclick for a td:

    Code:
    <td align="center" bgcolor="#F2EBE3" onmouseover="dropdownmenu(this, event, menu1, '150px');" onmouseout="delayhidemenu();">
    The main reason that FP_callJS() messes this up is probably that event no longer means what it did in the original syntax. I can't think of any reason to use FP_callJS(), but I'm not sure exactly what it is. It looks to me to be some sort of (perhaps well intended) nonsense from Front Page, is it?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Beautiful... that was it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •