PDA

View Full Version : Expand/close through image suffix for Accordion header hyperlinks



urbini
11-15-2010, 03:02 PM
1) Script Title: Accordion Content script (v1.9)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordion.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

ddadmin
11-15-2010, 10:33 PM
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.

urbini
11-16-2010, 09:37 AM
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

ddadmin
11-16-2010, 10:02 PM
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.