X
Tap here to go to the mobile version of the site.

Support Forum

"a name" html tag not functional across frames

Posted

I am using a link in one frame to reference the "a name" tag in another frame. Works fine in IE, Chrome, Opera but not in Firefox.

I realize that the hashtag "#" in a URL does not work in Firefox, for some unexplained reason, but I can't remove the hashtag in the originating URL as the target frame and named location will not be processed correctly.

In frame 1 here is the code pointing to the URL in frame 2: <a href="right-body.htm#1000">1000</a>

In frame 2 (right-body.htm) here is the code for the target link: <a name="1000"></a>

Removing the hashtag (#) wil render the link unusable.

Any thoughts/suggestions?

Thanks!

I am using a link in one frame to reference the "a name" tag in another frame. Works fine in IE, Chrome, Opera but not in Firefox. I realize that the hashtag "#" in a URL does not work in Firefox, for some unexplained reason, but I can't remove the hashtag in the originating URL as the target frame and named location will not be processed correctly. In frame 1 here is the code pointing to the URL in frame 2: &lt;a href="right-body.htm#1000"&gt;1000&lt;/a&gt; In frame 2 (right-body.htm) here is the code for the target link: &lt;a name="1000"&gt;&lt;/a&gt; Removing the hashtag (#) wil render the link unusable. Any thoughts/suggestions? Thanks!

Modified by cor-el

Additional System Details

Installed Plug-ins

  • Shockwave Flash 14.0 r0
  • Google Update
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.10
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • 5.1.30214.0
  • GEPlugin
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • iPrint Plug-in 1.0.0 - Provides iPrint client services for Windows
  • Novell iPrint Scriptable Plug-in provides functions for the iPrint Map Designer
  • 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:31.0) Gecko/20100101 Firefox/31.0

More Information

jscher2000
  • Top 10 Contributor
3251 solutions 29637 answers

You probably simplified the code for posting. Do you have an explicit target attribute in the tag? Otherwise, I would expect the link in frame 1 to target frame 1 instead of frame 2.

If you check Firefox's Browser Console, do you see any related warnings or errors? You can launch the console by pressing Ctrl+Shift+j. Then to clear debris, I suggest clicking the Clear button before switching over to Firefox, reloading the page and trying the link again.

You probably simplified the code for posting. Do you have an explicit target attribute in the tag? Otherwise, I would expect the link in frame 1 to target frame 1 instead of frame 2. If you check Firefox's Browser Console, do you see any related warnings or errors? You can launch the console by pressing Ctrl+Shift+j. Then to clear debris, I suggest clicking the Clear button before switching over to Firefox, reloading the page and trying the link again.

Question owner

Yes the source and target frames are different. Here's the more correct code:

In frame1 here is the code pointing to the URL in frame2: <a href="right-body.htm#1000" target="frame2">1000</a>

In frame2 (right-body.htm) here is the code for the target link: <a name="1000"></a>

Still hoping for a solution to this, although realizing it may not be there.

Yes the source and target frames are different. Here's the more correct code: In frame1 here is the code pointing to the URL in frame2: <a href="right-body.htm#1000" target="frame2">1000</a> In frame2 (right-body.htm) here is the code for the target link: <a name="1000"></a> Still hoping for a solution to this, although realizing it may not be there.
jscher2000
  • Top 10 Contributor
3251 solutions 29637 answers

Is there a live example online to play with?

I noticed in the MDN article that the name attribute is considered "obsolete" in HTML5, and that we should switch to using the id attribute for internal navigation. Not sure whether this is affecting your page. Do you have the old HTML 4.01 DOCTYPE at the top of the page?

Is there a live example online to play with? I noticed in the MDN article that the name attribute is considered "obsolete" in HTML5, and that we should switch to using the id attribute for internal navigation. Not sure whether this is affecting your page. Do you have the old HTML 4.01 DOCTYPE at the top of the page? * https://developer.mozilla.org/docs/Web/HTML/Element/a * http://www.w3.org/QA/2002/04/valid-dtd-list.html#DTD

Question owner

No, nothing online at this moment that others can play with. May post a link sometime later.

Have tried both of these to no avail. !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"

and "quirks mode" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

Interesting that Firefox is the only browser I can't get the code to work with. Seems to me to be a Mozilla issue as other engines seems to translate things correctly.

Appreciate the help/suggestions BTW!!

No, nothing online at this moment that others can play with. May post a link sometime later. Have tried both of these to no avail. !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" and "quirks mode" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" Interesting that Firefox is the only browser I can't get the code to work with. Seems to me to be a Mozilla issue as other engines seems to translate things correctly. Appreciate the help/suggestions BTW!!

Modified by kennyg92