scriptygoddess

11 Dec, 2003

Javascript: Pull-down menus with pop-up links

Posted by: Jennifer In: Script snippet

  • Original Script: The JavaScript Source
  • Corrections: The original was incorrectly pasted on the source page, so it failed to execute properly. I fixed that problem and also added an option for background and text colors on the pull-down menu. Scrollbars and toolbars were added to the pop-up links.
  • Instructions: Change the bold code to meet your site's needs.
  • Customizations: Go for it! The menu font size is set at 10pt by default, but I use 9pt on BB. The background color is white and text is black, but delete the options or change to meet your needs.

    Place somewhere in the HEAD tags:

    <script language="JavaScript">
    function formHandler(form) {
    var windowprops = "toolbar=yes,location=yes,status=yes,menubar=yes,
    scrollbars=yes,resizable=yes,width=500,height=500";
    var URL = form.site.options[form.site.selectedIndex].value;
    popup = window.open(URL,"MenuPopup",windowprops);
    }
    </script>

    Place in menu location:

    <form name=form>
    <select name="site" size="1" onChange="formHandler(this.form)" style="background-color: FFFFF; color: 00000; font-size:10pt;">
    <option selected>YOUR MENU DESCRIPTION</option>
    <option value="YOUR LINK">YOUR LINK DESCRIPTION</option>
    </select>
    </form>

    Related posts:

    1. Anchor Links in WordPress Posts – another shortcode solution I was recently asked by a client how they could...

    Related posts brought to you by Yet Another Related Posts Plugin.

  • 1 Response to "Javascript: Pull-down menus with pop-up links"

    1 | Heather Suzanne Cash

    January 17th, 2004 at 12:00 am

    Avatar

    Hi… I am confused because my client says that this popup window doesn't come up on one of her computers, and on the other one, it comes up, but nothing is inside of it. On my computer, it works fine (windowsxp, ie6.0)
    Can you tell me if it works okay with you? If the popup window comes up on the first page, and if there is anything in it?
    Thanks so much,
    and, if you view this post, please reply!!!!!!

    The site is: http://jackkapanka.com

    Heather

    Featured Sponsors


    • Michael: You can use get_header(2) in your case. The filename of your custom header has to be header-2.php. The problem with include(your_file.php) is, all
    • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
    • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

    About


    Advertisements