Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Invisible >Thread Next - Re: Invisible Re: InvisibleTo: NULL Date: 10/8/2008 8:48:00 AM "lanmind" <LANMIND01@g...> wrote in message news:29a0535b-a09c-46bf-a7ef-cb83341a7094@t...... > Hello, > > I have a PHP script that returns a PHP variable's value (a number in > this case) inside an XML document to the client. Is it possible to > make this number invisible when the user views the returned XML but > still accessible by some javascript? > > Thank you Most browsers don't display raw XML, they apply a stylesheet first to turn it into (X)HTML. If your user is actually seeing the XML then there's nothing you can do. If they are seeing HTML then you can either: Store the data in a hidden input element or a variable or a hidden div. This will be accessible via script but also via view source. Or Retrieve the XML via an XmlHTTPRequest. Then process it via script. This way they won't be able to see it unless they have some sort of helper installed, Fiddler for example, which can view the raw HTTP traffic. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
