| 2:05 pm on Mar 30, 2011 (gmt 0)|
Hi Izzy and welcome to WebmasterWorld.
It's not an iframe thing, it's an anchor attribute thing.
Try using the "name" attribute and it might work properly: <a name="anchor"></a>
| 3:20 pm on Mar 30, 2011 (gmt 0)|
thanks for your quick response. I did try with "name" instead of "id" and still doesn't work. As I mentionned, if I display the page outside the iframe, the anchors works perfectly with Firefox. That's why I thought it was a iframe problem. Could there be some setting with Firefox that I'm not aware of?
| 3:26 pm on Mar 30, 2011 (gmt 0)|
Could it be a window focus thing?
Like you need to select the iframe before it works within the iframe?
| 4:45 pm on Mar 30, 2011 (gmt 0)|
Did you try it on a non-empty element? It doesn't have to be an anchor.
<a href="#anchor">to anchor</a>
<h2 id="anchor">Topic three</h2>
I just tested it using ID's but don't have 4.0, maybe it's specific to 4.0 - did you validate all documents?
| 5:30 pm on Mar 30, 2011 (gmt 0)|
thanks for your input!
It is a 4.0 thing...Someone I know tested it with a previous version of Firefox and it's workin fine....
I did also try with an non-empty element and with "id' and still doesn't work...I will look into what incrediBILL suggested and see...
Will post the fix if I find one!
| 5:44 pm on Mar 30, 2011 (gmt 0)|
if it's a FF 4 thing I'd go report the bug to them then because I found lots of little quirks in FF 4 and bailed on it.
BTW, why do both of you use the ID attribute instead of the NAME attribute?
I trust W3C's definition of this: [w3schools.com...]
Although ID might work, NAME is what it's always supposed to have been for this purpose if I'm not mistaken.
| 7:02 pm on Mar 30, 2011 (gmt 0)|
Actually, it's a note I read from the w3school site. They say that the upcoming HTML5 standard suggest using the id attribute instead"...
I'll report the bug to FF 4
| 7:22 pm on Mar 30, 2011 (gmt 0)|
Name is deprecated [w3.org] for non form elements in XHTML. It will still work for anchors and don't think it's deprecated in other doctypes, but it's a habit thing for me - name for form elements, id for DOM objects.
| 8:35 pm on Mar 30, 2011 (gmt 0)|
Ah, an HTML 5 thing, good to know.
You can see how I'd be confused with the W3C docs I linked which are currently coming to the top for the query ;)
I know what I know if you know what I mean, and now I know more!