Results 1 to 5 of 5

Thread: Pop Up Links in Scrollable Menu Links

  1. #1
    Join Date
    Nov 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pop Up Links in Scrollable Menu Links

    Script: Scrollable Menu Links
    http://www.dynamicdrive.com/dynamici...rollerlink.htm

    I am trying to edit this script so that when clicked a link will open in a new (pop up) window. In the end, I want this pop-up window to be "chromeless" (no address bar, scroll bar, menu...). So far, I've been terribly unsuccessful. Im fairly new to Javascript, and HTML for that matter, so I'll thank you in advance for your help and patients.

    Please, let me know if I should provide any more information on this code or my page...

  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

    You can add in something like this (as I have for the second link, highlighted red) to the configured link(s) for those you want to have this treatment (from the demo):

    Code:
    var menucontents='<nobr><a href="http://www.dynamicdrive.com">Dynamic Drive</a> | <a href="http://www.javascriptkit.com" onclick="window.open(this.href,\'\',\'width=600, height=400\');return false;">JavaScript Kit</a> | <a href="http://www.codingforums.com">CodingForums.com</a> | <a href="http://www.builder.com">Builder.com</a> | <a href="http://freewarejava.com">Freewarejava.com</a></nobr>'
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    How can I get the pop up window to show the scroll bar? Thanks to whomever helps!

  4. #4
    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

    Quote Originally Posted by nfgkid
    How can I get the pop up window to show the scroll bar? Thanks to whomever helps!
    Working from my above example, add into the specifications' section:

    Code:
    onclick="window.open(this.href,\'\',\'width=600, height=400, scrollbars=1\');return false;"
    For a fairly good listing of most of what can be done with this method, see HTML DOM open() Method at the w3schools. Just remember that in this particular case, we are escaping with a down slash (\) all single quotes ('). This is because the above was originally a part of a string that was itself enclosed in single quotes:

    Code:
    var menucontents='<nobr><a href="htt . . . m</a></nobr>'
    In general usage, this is not required and probably will cause an error.
    - John
    ________________________

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

  5. #5
    Join Date
    Feb 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks! Worked like a charm. This forum is so freakin' rad. I always find what I'm looking for.

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
  •