X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

How do you make #nameddest work in firefox, it work for IE

Posted

If I add a #nameddest at the end of a web link and open it in IE, it works fine and goes to the named destination, if I open the same link in firefox it just goes to page 1 every time? Am I doing something wrong?

Chosen solution

Aha, a PDF is different than a web page!

For me, that link scrolls down to the 15th page, which seems a bit random. I tried Firefox 20.0.1 and Firefox 21 beta 7, both using the built-in PDF viewer (introduced in Firefox 19). Are you testing in the viewer, or in Adobe's plugin?

There was a bug in the viewer, fixed a little over 3 weeks ago, however, Firefox doesn't pick up these changes immediately.

References:

Read this answer in context 2

Additional System Details

Installed Plug-ins

  • Google Update
  • Shockwave Flash 11.7 r700
  • GEPlugin
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.6
  • np-mswmp
  • 5.1.20125.0
  • A plugin to detect whether the Adobe Application Manager is installed on this machine.
  • NPWLPG
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0

More Information

jscher2000
  • Top 10 Contributor
2365 solutions 20922 answers

Let's say you have this link: example.com/page.html#section2

That will scroll the page to either of these:

<div id="section2">
<div><a name="section2"></a>

Notice that the id or name value does NOT contain the hash mark (#). If your id or name value contains the hash mark, then you have to double the hash mark in your link.

Does that help?

jscher2000
  • Top 10 Contributor
2365 solutions 20922 answers

There have been some examples here in the past where Firefox went to the wrong part of the page (such as the bottom). This can happen when the page length changes dynamically after the content loads. However, this is difficult to diagnose without a link, so if the general comment didn't help, can you reply with a link to the problem page?

Question owner

Thanks a lot for taking time to help, it is much appreciated! Unfortunately it still doesn't work, see the link below

http://www.haztec.biz/images/downloads/Vehicle%20sirens%20V1.8.pdf#undermount

It just opens at the front page as if the named destination is not there.

I also tried

http://www.haztec.biz/images/downloads/Vehicle%20sirens%20V1.8.pdf#nameddest=undermount

Th second one works fine in IE but not in firefox.

Modified by haztec

jscher2000
  • Top 10 Contributor
2365 solutions 20922 answers

Chosen Solution

Aha, a PDF is different than a web page!

For me, that link scrolls down to the 15th page, which seems a bit random. I tried Firefox 20.0.1 and Firefox 21 beta 7, both using the built-in PDF viewer (introduced in Firefox 19). Are you testing in the viewer, or in Adobe's plugin?

There was a bug in the viewer, fixed a little over 3 weeks ago, however, Firefox doesn't pick up these changes immediately.

References:

Question owner

Thanks I was using the built in viewer, I tried disabling the built in viewer but to no avail, it continued to use the built in viewer whether I liked it or not! I don't really understand what a PDF.JS library is, but I installed it from the link you sent and the named destination works fine now. The problem is though that If other people use the link on different machines, presumably the named destination won't work for them.

Hopefully all will be well when the latest bug fix rolls out globally?