Reply to Re: How to convert HTML special characters to the real characters with a Java script

Your name:

Reply:


Posted by nice.guy.nige on 03/22/06 02:00

While the city slept, Stefan Mueller (seekware-remove-@yahoo.com) feverishly
typed...

[html entities, php & js]

> But if I click on the button 'Old Data' the Java script function
> 'set_old_data' shows in the input box
>
>
äöüÄÖÜçéàè"&#
039;
> instead of δφόΔΦάηιΰθ"'
>
> Therefore I need a Java script function with translates
>
>
äöüÄÖÜçéàè"&#
039;
> to δφόΔΦάηιΰθ"'

You do indeed...... or do you?

> In PHP I could do that with the function
> html_entity_decode()

Yup, you probably could...

> But how can I do it with a Java script?

Don't forget that php can be "slotted into" your html (and presumably
therefore your js code). Could you not use;

(javascript stuff...)

var content = "<? php echo(html_entity_decode($stringFullOfHtmlEntities))
?>";

(...more javascript stuff....)

Just a thought straight off the top of my head, no idea if it will even
work!

Hope that helps,
Nige

--
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация