473,395 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

anchor fails in fire fox

Here's an example of what i'm trying to do.

At www.webpage.com/page1.php, there's a link that points to an anchor at www.webpage.com/page2.php. The syntax is: <a href="page2.php#anchor">Link</a>

Now on page2.php I have that anchor placed inside a header tag. The syntax is: <h2><a name="anchor">Header</a></h2>

The link on page1.php to the anchor on page2.php works just find in IE7. But it doesn't work in firefox. The link takes the browser to page2.php but not down to the anchor.

Now I had this problem a while back ago, and I can't for the life of me remember how to fix it. Any takers? Thanks.
Jul 24 '07 #1
5 3180
drhowarddrfine
7,435 Expert 4TB
Hm. Works for me. .
Jul 24 '07 #2
hmmm--ran the example and it worked for me too.

I took my code apart and determined that if I removed the require('header.php') line from the code, the anchor worked fine. I'm not sure what could be in my header file that would prevent fire fox from searching for and going to the anchor in the webpage.
Jul 25 '07 #3
so setting the display of the div holding the content with the anchor in it to none, then having javascript set the display to default on load will prevent firefox from finding the anchor... are there any workarounds this? i'm guessing it'll take javascript to do so...
Jul 25 '07 #4
drhowarddrfine
7,435 Expert 4TB
Hmm. From what I read this is an issue only with Firefox, however people don't seem to be sure if it's correct behavior or not. You can read this discussion but it might be something you should bring up in the javascript board. Another site claims it is a bug. I'm going to see if it's listed in Bugzilla. I didn't find anything about it in the mozilla forum or the knowledge base which makes me wonder, too, if it's not a bug.
Jul 25 '07 #5
Interesting. I would think, that just because something is set to display:none, firefox would skip it. It's still there, just invisible. Essentially, just because it isn't being displayed, doesn't mean it isn't there.

I think IE7 has the right idea. Although, it makes me wonder what would happen in IE7 if the text was never set back to display:block. Would it just jump down to empty space?
Jul 25 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Patrick | last post by:
I am trying to get "first-letter" to work inline withing an anchor. Actually I have not been able to get it to work within an <a> tag whether inline, linked, or embedded. Using IE6 service pack 1....
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
3
by: gary | last post by:
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a...
10
by: elibol | last post by:
Hi, Is there an event that fires when the back or forward button on a browser is pressed? I need an event to fire when someone clicks the back or forward button after an anchor has been set. ...
16
by: Frances | last post by:
<a href="#1"> <a name="#1"> this link is not working in FF (works fine in IE..) would appreciate thoughts/suggestions.. thank you.. Frances
8
by: knoxautoguy | last post by:
This problem has consumed a lot of my time, and I'm aftraid someone will tell me that my whole approach to this objective is wrong; however, I would like to know if there is a way to do this. I...
15
by: phillip.s.powell | last post by:
<style> div div table tr td a.navbar, div div table tr td font {display: none;} </style> <div class="navigationbar" style="background-color:Black; position: absolute; left:50%; top:127px;...
3
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a...
1
by: mercedes | last post by:
I have a form with 3 sections. there are 2 links on each sections to go to one of the others sections. (named anchors) Because the different sections may contain data or not, I want the form to open...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.