Results 1 to 3 of 3

Thread: AnyLink Menu with JS Links

  1. #1
    Join Date
    Sep 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default AnyLink Menu with JS Links

    1) Script Title: AnyLink Drop Down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem: one page "A" i have an instance of the jw player that i am trying to load a new file into through its api. in page "A" there is an iframe that page "B" gets loaded into. the anylink menu is on page "B". the link i normally use from page "B" to control the jw player on page "A" is:

    Code:
    <a href="#" onclick="javascript:loadNplay('song03.mp3', 'http://domain.org/wp-content/uploads/2008/08', 'sound', 'http://domain.org/pictures/show_00000012/2401711130.jpg', 'http://domain.org/show'); return false;">show</a>
    however when i add this as a link in the menu array when the code gets to the first http:// it comments the rest of the line out in my editor so i am pretty sure thats my problem. here is the code i am using for the link from the anylink menu array:

    Code:
    menu1[0]='<a href="#" onclick="javascript:loadNplay('song03.mp3', 'http://domain.org/wp-content/uploads/2008/08', 'sound', 'http://domain.org/pictures/show_00000012/2401711130.jpg', 'http://domain.org/show'); return false;">show</a>'
    any idea how i can get this to work?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try something like:

    Code:
    menu1[0]='<a href="#" onclick="loadNplay(\'song03.mp3\', \'http://domain.org/wp-content/uploads/2008/08\', \'sound\', \'http://domain.org/pictures/show_00000012/2401711130.jpg\', \'http://domain.org/show\'); return false;">show</a>'
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    doughthedj (09-15-2008)

  4. #3
    Join Date
    Sep 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default @ddadmin

    that did the trick, thanks very much. the final code looks like this:

    Code:
    menu1[0]='<a href="#" onclick="javascript:parent.loadNplay(\'song03.mp3\', \'http://domain.org/wp-content/uploads/2008/08\', \'sound\', \'http://domain.org/pictures/show_00000012/2401711130.jpg\', \'http://domain.org/show\'); return false;">Show</a>'
    notice the parent.loadNplay, which changes the links focus from the iframe to the parent page, which i forgot last night. what an amazing site you guys have here. thanks again.

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
  •