Welcome to WebmasterWorld Guest from 54.205.60.49

Forum Moderators: open

Message Too Old, No Replies

ajax and pound and euro symbols

ajax and pound and euro symbols not displaying

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

10+ Year Member



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)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Well, you could always CDATA the string ... or use &euro; or &pound;
9:48 pm on Jun 22, 2007 (gmt 0)

10+ Year Member



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 :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month