The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
I wonder if any of you have an insight into the way that Firefox deals with javascript, that seems to be different from the way in which IE deals with it - in other words why is the same script displayed differently?
For example:
<script language="JavaScript" type="text/javascript">
<!--
document.write(Date())
// -->
</script>Displays Fri Jan 16 09:55:40 2009 in IE
but Fri Jan 16 2009 10:00:23 GMT+0000 (GMT Standard Time) in Firefox?
Admittedly, neither display is pretty, but the Firefox display just seems a bit OTT:-)
Thanks
And yes I agree with specifying both.
> Regarding ALT attributes, I was under the impression that they
> were 'desirable' under W3C 'requirements'. The title attribute
> used to be only used for the particular page 'title' - how is it
> now applied to images and will 'title' attributes display as ALT
> did in IE?
When you said the ALT text is not appearing in Firefox, I assume you mean when you hover over the element?
The W3C specification has always said the browser should display the ALT attribute if the element cannot be rendered. IE took this a step further and decided to render the ALT text as a tooltip even if the element is displayed. Theres some debate about this but its really incorrect behaviour as the spec provides the TITLE attribute for displaying tooltips when you hover over an element.
Bottom line is you should really specify both.
To McLong - I'm not using php because the site already exists and it would take too long to re-write and apparently time is of an essence- but I take your point:-(
To Garin - I had thought that a call to an external function would solve the problem and have written one in readiness.
Regarding ALT attributes, I was under the impression that they were 'desirable' under W3C 'requirements'. The title attribute used to be only used for the particular page 'title' - how is it now applied to images and will 'title' attributes display as ALT did in IE?
Gratefully yours, Old Confused:-D
> Most definately agree with what you say, but do you have any
> 'code' solution/suggestion that may provide the IE display in
> Firefox? This is Firefox 3.0.5
The "correct" method is to create yourself a Date object and then use the methods (getDay(), getFullYear() etc.) to form your own string. You could try cheating though, if do a substring of Date() and get the first 25 (ish) characters you'll just be left with the date/time.
> Have you also noticed that 'alt tags' don't display in Firefox
> either!
I suppose its more correct to say that IE is displaying ALT attributes when it shouldnt. :) Depends what you're doing but I suspect the title attribute is more appropriate (or both depending on the situation)
Also, is there any reason why you aren't using PHP to display the date? It's quite flexible in the format it displays in.
> I suppose the way Firefox displays it is the "correct"
> way though as it should be reporting everything it knows about
> the current date/time.
Thanks Garin, nice to 'read' you again.
Most definately agree with what you say, but do you have any 'code' solution/suggestion that may provide the IE display in Firefox? This is Firefox 3.0.5
Have you also noticed that 'alt tags' don't display in Firefox either!
> I wonder if any of you have an insight into the way that Firefox
> deals with javascript, that seems to be different from the way in
> which IE deals with it - in other words why is the same script
> displayed differently?
Not sure what anybody can say other than yes there are subtle implementation differences across browsers. As well as some larger differences like IE's proprietary stuff (some of which have been implemented by other browsers). If you try Date() in Opera, you'll get a different output again.
I suppose the way Firefox displays it is the "correct" way though as it should be reporting everything it knows about the current date/time.