473,800 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

anchor fails in fire fox

4 New Member
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">H eader</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 3201
drhowarddrfine
7,435 Recognized Expert Expert
Hm. Works for me. .
Jul 24 '07 #2
Meadock
4 New Member
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
Meadock
4 New Member
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 Recognized Expert Expert
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
Meadock
4 New Member
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
6878
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. <html> <head> <style type="text/css"> h5 {background-color: red; padding-left: 5px} a {color: white; font-size: 20px; text-decoration: none} </style>
6
3383
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 the usual stuff of recreating the usercontrol in the Page Init event. The 'failure' sequence is as follows: - select web form button to display the user control - select user control button, event fires - select web form button to display...
3
3877
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 hyperlink control and you assign the navigateurl property = "../#anchor" whereby you want to add this # reference to the current url the url ends up with the #anchor twice.
10
2715
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. Thanks so much for reading about my problem! H
16
14503
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
4810
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 have a web page divided into two major segments, with the top segment fixed and the bottom segment allowed to scroll, thus giving the look of frames without frames. I also have anchors so that users can click on a letter of the alphabet to jump...
15
3914
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; margin-left: -400px; width: 800px; height: 26px"> <!-- CODE GOES HERE --> </div>
3
4526
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 runtime control to anchor properly? Second -- the program I'm writting is supposed to look like a dos application (long story). When the application is "Normal" aka a small window then everything looks great. But when I resize the window to...
1
2009
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 on the section that contain data, automatically. I need a script that fire the onclick of the links, depending of the data. I don't want the focus() effect, because the sections are not on the top. I want the same response that clicking the...
0
9690
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.