Skip to content Skip to sidebar Skip to footer

In Page Anchor Not Working In Firefox

I have got my code something like below which repeats to the number of shots varying for every page. My aim is to open a popup and go to that particular shot straight by url like w

Solution 1:

ANCHOR

<aname="Anchorname"></a>

for example: normal way

<div><ahref="#ShotNumber">Go to ShotNumber</a><!-- Link to ShotNumber --><ahref="#12">Go to 12</a><!-- Link to 12--></div><!-- more stuff --><div><aname="ShotNumber"></a><!-- Anchor name=ShotNumber -->
   HTML FOR ShotNumber
 </div><!-- more stuff --><div><aname="12"></a><!-- Anchor name=12 -->
   HTML FOR 12
 </div>

Call it like:

example.com/myShot.html#ShotNumber

EDIT:html5: the-indicated-part-of-the-document

If there is an element in the DOM that has an ID exactly equal to decoded fragid, then the first such element in tree order is the indicated part of the document; stop the algorithm here.

If there is an a element in the DOM that has a name attribute whose value is exactly equal to fragid (not decoded fragid), then the first such element in tree order is the indicated part of the document; stop the algorithm here.

Solution 2:

Try <a name="12">This is item number 12</a>

and then <a href="#12">Go to item number 12</a>.

Also, the anchor id thing is not supported in HTML5, they say. This might be of interest.

Post a Comment for "In Page Anchor Not Working In Firefox"