Ultimate Web Site Drop Down Menu Forum

Ultimate Web Site Drop Down Menu Forum (http://www.udm4.com/forum/index.php)
-   Troubleshooting (http://www.udm4.com/forum/forumdisplay.php?f=12)
-   -   Don't understand what's needed to get popup relative to link to work (http://www.udm4.com/forum/showthread.php?t=1150)

trout_scout 04-10-2008 08:55 PM

Don't understand what's needed to get popup relative to link to work
 
You'll notice in the code below that I am pointing back to this website for css and js. Can someone please give me a sample of what should go in each of these? I have a working version of UDM4 working on my website. But now I am trying to create a second menu and understand that popup is my only choice here. Also can someone clarify -- can I have one drop down and then mulitiple popup menus or do I have to reconfigure my drop down nav bar as popup menus when I add a second nav bar?

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
    <title>testme</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <script type="text/javascript">
        //open menu with given ID
        function openMenu(menuID,linkObj)
        {
            //if the menu code is ready
            if(um.ready)
            {
                //find co-ordinates of link object
                var coords = {
                    'x' : um.getRealPosition(linkObj,'x'),
                    'y' : um.getRealPosition(linkObj,'y')
                    };
                   
                //increase y-position to place it below the link
                coords.y += (linkObj.offsetHeight + 4);
               
                //activate menu at returned co-ordinates
                um.activateMenu(menuID, coords.x + 'px', coords.y + 'px');
            }
        }
       
        //close menu with given ID
        function closeMenu(menuID)
        {
            //if the menu code is ready
            if(um.ready)
            {
                //deactive menu
                um.deactivateMenu(menuID);
            }
        }

    </script>
    <link rel="stylesheet" type="text/css" href="http://www.udm4.com/udm-resources/udm-style.php?config=/var/www/vhosts/udm4.com/httpdocs/demos/popup-relative.ini" media="screen">
</head>
<body>
        <div class="demoPara">
            <p>
                Like this link to the
                <a href="/menu/"
                    onMouseOver="openMenu('about',this)"
                    onMouseOut="closeMenu('about')">
                    About UDM</a> section.
            </p>   
        </div>

<ul id="udm" class="udm">
    <li id="about"><a id="aboutButton" class="navButton" href="/menu/" title="About UDM">About</a>
        <ul>
            <li><a href="/menu/">About UDM</a></li>
            <li><a href="/menu/benefits/" class="icon thumbsup">The Benefits of UDM 4</a></li>
            <li><a href="/menu/browsers/" class="msicon mschart">Browser support</a></li>
            <li><a href="/menu/accessibility/" class="icon task msicon mstask">Accessibility tests</a></li>
            <li><a href="/menu/disadvantages/">Any disadvantages?</a></li>
            <li><a href="/menu/faq/" class="msicon mshelp">General FAQ</a></li>
            <li class="dividerAbove"><a href="/menu/modules/" class="icon cog msicon mstools">Modules &amp; Extensions</a></li>
            <li><a href="/menu/updates/">Script updates</a></li>
            <li class="dividerAbove"><a href="/menu/author/" class="icon favicon">About the author</a></li>
            <li><a href="/licensing/affiliates/" class="icon thumbsup">Affiliate Program</a></li>
            <li><a href="/menu/credits/">Credits and thanks</a></li>
            <li><a href="/licensing/linkback/" title="Link-back to Ultimate Drop Down Menu"> Link-back to UDM</a></li>
        </ul>
    </li>
</ul>
    <script type="text/javascript" src="http://www.udm4.com/udm-resources/udm-dom.php?config=/var/www/vhosts/udm4.com/httpdocs/demos/popup-relative.ini"></script>
</body>
</html>


04-11-2008 01:39 PM

Not sure if you checked out these resources or not.

Popup menus: http://www.udm4.com/demos/popup-relative.php
More info: http://www.udm4.com/manual/depth/pop...mples-relative

My guess is that you have though. As far as running 2 menus on the same page, you would need to do everything as a popup style to get that effect and even then, mixing horizontal and vertical can be difficult.

As far as the menus not working, its probably a path issue. You're including the code from this site, but that usually is looking for some resources in the "/udm-resources/" folder, which needs to be on your server.

Hope this helps.

trout_scout 04-11-2008 03:08 PM

I spent consideral time on the resources on this website already. That is why I am posting here. Thanks.

04-11-2008 04:25 PM

Can you post an URL to your development site? That would help us better trouble shoot the problem.

trout_scout 04-11-2008 05:25 PM

My development site is behind a firewall. That is why I sent the html page in my post.

trout_scout 04-14-2008 06:16 PM

I got this working now. I don't think that the examples did a good job of explaining that in addtion to the inline head JavaScript, you still need udm-control.js and udm-style.js. This is in addition to popup-relative.js. I am still in the process of decyphering the nuances between popup-relative.js and udm-custom.js. The differences appear to be minor. I also did not realize that I needed udm-dom.js in the body.

Thanks for your assistance in this matter.


All times are GMT. The time now is 09:39 AM.

Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.