Results 1 to 4 of 4

Thread: Expand/close through image suffix for Accordion header hyperlinks

  1. #1
    Join Date
    Jun 2009
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Expand/close through image suffix for Accordion header hyperlinks

    1) Script Title: Accordion Content script (v1.9)

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

    3) Describe problem:
    In order to make the Accordion headers work as hyperlinks, I've set revealtype=clickgo. But now I can't manage to simply expand/close the content through the suffix image: this image shouldn't work as hyperlink too.
    In other words, I would like that:
    - clicking on the headers makes the content expand and then go to the link (as it already makes);
    - clicking on the image suffix makes only expand/close the content of the headers, without going to the link.
    All this for the body (not for the menus on the right) of the page http://www.sba.unifi.it/CMpro-v-p-1.html
    Last edited by urbini; 11-16-2010 at 11:04 AM.

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

    Default

    Try the below modified .js file, which stops the header from actually navigating to a URL upon expanding when the element clicked on within the header is an image.
    DD Admin

  3. #3
    Join Date
    Jun 2009
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Ok, it works! (tested with Firefox 3.6, Opera 9, Google Chrome 6, IE6)
    But I submit you another "bug": the header hyperlinks don't open in a new window as set through the target="_blank" attribute.
    Thanks for now

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

    Default

    But I submit you another "bug": the header hyperlinks don't open in a new window as set through the target="_blank" attribute.
    There's no easy way for the header links to open in a new window when revealtype is set to clickgo unfortunately. That's because in this case the script uses JavaScript to redirect the user to the destination URL- trying to open a new window for this in JavaScript triggers the pop up blocker built into many browsers, such as FF and IE.
    DD Admin

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
  •