Results 1 to 3 of 3

Thread: AnyLink Drop Down Menu & IFrame SSI script II

  1. #1
    Join Date
    Jan 2006
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default AnyLink Drop Down Menu & IFrame SSI script II

    Hi,

    I'm trying to open an external page using the IFrame SSI script II (http://www.dynamicdrive.com/dynamici...iframessi2.htm) with a link inside of a drop down menu (http://www.dynamicdrive.com/dynamici...pmenuindex.htm).

    If I want to open an external page from a link on my main page, I should use the following code.

    Code:
    <a href="javascript:loadintoIframe('myframe', 'external.htm')">Link</a>
    That works great! HOWEVER, when I want to open an external page from a link in A PULL DOWN MENU from my main page it does not work. Here's an example of the code I'm using.

    Code:
          
    menu1[0]='<a href="javascript:loadintoIframe('myframe', 'alumni/directory.html')">Directory</a>'
    I guess I'm using my " and ' in the wrong places.
    Last edited by BrightStarPro; 01-29-2006 at 08:01 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Code:
    menu1[0]='<a href="javascript:loadintoIframe(\'myframe\', \'alumni/directory.html\')">Directory</a>'
    or:

    Code:
    menu1[0]='<a href=javascript:loadintoIframe("myframe","alumni/directory.html") >Directory</a>'
    Either should work. The first is better, as the second will break if spaces are introduced in the wrong places, more so than the first will. The idea being that if you are using ' to delimit the string for the variable menu1[0], you must escape (\) it's use inside the string.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2006
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Works like a charm. Thanks so much!

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
  •