View Full Version : How to use named anchors with Accordion Content script (v1.6)

01-06-2009, 05:45 PM
Hello Guys,
I use Accordion content script and love it.
May be someone can help me to achieve following.
For example one page contains Accordion dynamic content which consist of 10 elements.
I want to navigate to element #7 in accordion content from external page using named anchor.

When the user would click the link on that external page it would go to the page where Accordion content is and automatically would expend element #7.

It doesn't work in a way I know.
Can anybody help to find the way around it? :D

01-06-2009, 11:45 PM
Warning: Please include a link to the DD script in question in your post, in this case, Accordion Content script (http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm). See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

To answer your question, the section "Remote links that expand select headers on the target page (http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment.htm)" shows how to have a link on another page load the target page with a certain header expanded. To get the browser to actually jump to that header on the target page, you can try using a HTML anchor at the same time, so instead of just:

<a href="target.htm?accordionheaderclass=2">Target Page</a>

Your link may look like:

<a href="target.htm?accordionheaderclass=2#myanchor">Target Page</a>

If you're not familiar with HTML anchors, simply do a search on Google.