Forum OpenACS Development: Use DIV ID as anchor

Collapse
Posted by Malte Sussdorff on
Is it possible to use a <div id= ..> as an anchor to jump to in a page or do I have to put the anchor in there in addition?
Collapse
2: Re: Use DIV ID as anchor (response to 1)
Posted by Tom Jackson on
Considering the fact that not even &lt;a id= ..&gt; will work, div probably isn't going to work either:


&lt;A HREF="#what"&gt;What is Linux ACPI?&lt;/A&gt;
....
&lt;A NAME="what"&gt;

Collapse
3: Re: Use DIV ID as anchor (response to 2)
Posted by Brian Fenton on
Hi Malte,
I'm not quite sure what you're asking especially about DIVs but this location.replace works to jump to an anchor (I prefer it to focus as focus puts it just out of the line-of-sight:

<body onload="location.replace('#myAnchor');">

<a href='#' id="myAnchor"</a>

hope this helps
Brian