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>

  • 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

    Genesis Framework for WordPress

    Advertise Here


    • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
    • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
    • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

    About


    Advertisements