homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

ajax and pound and euro symbols
ajax and pound and euro symbols not displaying

 9:59 pm on Jun 21, 2007 (gmt 0)

I've got a php function that gets from the user perferred currency symbol from a MySQL DB.

When I store it, it's a standard POST php page. The bog standard page returns and displays the pound and euro symbols fine...

When I want to display it, it's via an ajax function "populating" a div with what's returned by calling a document to return a number and stick the user currency in front of it..........however it's rendered via a <div name>.innerHTML=xmlHttp.responseText javascript function which isn't sorting the rendering of the symbols correctly.

Is it something I could sort with JavaScript unescape function (store an escaped or ?)....and does that have security implications if somehow I get escaped junk in my DB - or am I missing a cleaner way of doing it?

Newish to php/ajax/mySQL - being old school it's always easier to knock up with classic asp/MSAccess - but you just can't impress the punters these days with endless page refreshes, and a desktop DB :)!



 10:05 pm on Jun 21, 2007 (gmt 0)

Well, you could always CDATA the string ... or use &euro; or &pound;


 9:48 pm on Jun 22, 2007 (gmt 0)

cheers - i'd missed something in my function not converting to & pound etc properly - was thinking it was something more complex than it was, but all sorted now :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved