Problems with HTML entities and javascript

M

Mick White

http://www.mickweb.com/javascript/arrays/cardhand.html
http://www.mickweb.com/javascript/arrays/cards.js

Viewing the first URL in my installed version of Firefox (.8, Mac), the
following HTML entities:
S=["♥","♦","♣","♠" "&hearts"
are rendered as various "pipe" symbols.

Is this a limitation of the browser, or am I doing something wrong?

Works in Mac versions NN7, Mozilla (latest) and Safari 1.0.2, but IE5.2
won't survive a refresh (I'm not too concerned with this POJ).

I am not employing object detection at this point, I merely need to
understand which HTML entities are universal, or which DTD to use, or
which character set, or what.....

Mick
 
M

Martin Honnen

Mick said:
http://www.mickweb.com/javascript/arrays/cardhand.html
http://www.mickweb.com/javascript/arrays/cards.js

Viewing the first URL in my installed version of Firefox (.8, Mac), the
following HTML entities:
S=["♥","♦","♣","♠" "&hearts"
are rendered as various "pipe" symbols.

Is this a limitation of the browser, or am I doing something wrong?

Works in Mac versions NN7, Mozilla (latest) and Safari 1.0.2, but IE5.2
won't survive a refresh (I'm not too concerned with this POJ).

I have visited cardhand.html with Netscape 7.1, FireFox 0.8 and 0.9 (all
on Windows) and can't find anything wrong with the display of those
entity references.
As for Firefox 0.8 Mac, have you checked whether the entity references
are displayed correctly when used in static HTML? That way you could
decide whether it is a JavaScript problem at all or simply a rendering
glitch.
 
M

Mick White

Martin said:
Mick White wrote: ....
Viewing the first URL in my installed version of Firefox (.8, Mac),
the following HTML entities:
S=["♥","♦","♣","♠"]
are rendered as various "pipe" symbols.

As for Firefox 0.8 Mac, have you checked whether the entity references
are displayed correctly when used in static HTML? That way you could
decide whether it is a JavaScript problem at all or simply a rendering
glitch.

Same thing, ♥ renders as | (thick and bold).
Thanks, Martin.
Mick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top