strange html code to set the type of characters

F

Fabrizio

On a web page i found a very strange html code (see at the en of this
message) to set the type of the characters (like bold, italic, etc.)
and I have 2 question

1) How interpreter this code ?
2) can I use this code to set also the colour and the font used for the
text (like verdana) ? If yes how ?

Thank you in advance for your help

Fabrizio

The strange code (the code that contain "%" like "%3Cb%3ECopenhagen
08/01%3C/b%3E"


<area shape="rect" coords="384,137,448,162"
href="Copenhagen_01/italiano.htm" alt="Copenhagen" title="Copenhagen"

onMouseOver="MM_changeProp('dest1','','src','Copenhagen_01/s1.jpg','IMG');MM_changeProp('dest2','','src','common/bia

nca.gif','IMG');MM_setTextOfLayer('titolo','','%3Cb%3ECopenhagen

08/01%3C/b%3E');MM_setTextOfLayer('descrizione','','%3Ci%3EPrima di
proseguire per la Groenlandia, ho

l%27opportunit&amp;#224; di fare un breve giro nel centro di
Copenhagen.%3C/i%3E')"

onMouseOut="MM_setTextOfLayer('descrizione','','%3Ci%3ESpostare il
mouse sulla cartina per selezionare un viaggio.

Ciascun viaggio e%27 indicato con colori
diversi.%3C/i%3E');MM_setTextOfLayer('titolo','','%3Cb%3EMenu dei

viaggi%3C/b%3E');MM_changeProp('dest2','','src','common/bianca.gif','IMG');MM_changeProp('dest1','','src','common/bi

anca.gif','IMG')">
 
S

Steve Pugh

Fabrizio said:
On a web page i found a very strange html code (see at the en of this
message) to set the type of the characters (like bold, italic, etc.)
and I have 2 question
MM_setTextOfLayer('titolo','','%3Cb%3ECopenhagen 08/01%3C/b%3E');
1) How interpreter this code ?

%3C = <
%3E = >

Those are just URL encoded characters. But here they are not being used
as part of URLs.

So the real meat if what's going on can only be determined
by examing the MM_setTextOfLayer JavaScript function.

The MM_ means that this function was created by Macromedia Dreamweaver,
which means that it probably isnt very good as most of their canned
JavaScripts are somewhat lacking.
2) can I use this code to set also the colour and the font used for the
text (like verdana) ? If yes how ?

Maybe.
%3Cfont%20face%3d%22Verdana%22%3Esome text%3C/font%3E might work if
used in place of %3Cb%3Esome text%3C/b%3E
It's the same as using
<font face="Verdana">some text</font> instead if <b>some text</b>

But there are certainly better ways of doing this.

Steve
 

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top