Click to See Complete Forum and Search --> : Link to anchor within unexpanded text


Tragichild
01-21-2009, 03:41 PM
I need some help linking to an anchor within an unexpanded content box. As it stands now, the link takes me to the right page but doesn't expand the box to display the area I'm actually linking to.

Below is code from the page (eventslisting.html) that I'm linking to. The anchor I'm trying to link to is named "feb5" and is within an expandable content box that defaults to be collapsed:



<div style="border: 1px solid #000000; padding: 0px; background: #FFFFFF; "><table border="0" cellspacing="0" cellpadding="2" width="100%" style="background: #00157A; color: #FFFFFF; "><tr>
<td class="style14">BC Events</td>
<td align="right">
[<a title="show/hide" id="exp1232069726_link" href="javascript: void(0);" onclick="toggle(this, 'exp1232069726');" style="text-decoration: none; color: #FFFFFF; ">-</a>]</td></tr></table>
<div id="exp1232069726" style="padding: 3px;">
<p class="style14"><a name="feb5" id="feb5"]></a>


Currently the link I have to this anchor is just set up as


<a href="eventslisting.html#feb5">


Can anyone tell me how I can create a link which will make the box expand automatically to show the area containing the anchor?

Thanks!

Fang
01-22-2009, 01:23 AM
To aid accessibility nothing should be hidden by css when the document is displayed.
Close the elements you initially want hidden using JavaScript. This script would parse the URL for a bookmark, opening and closing the relevant elements.