Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - AJAX and HTML entities
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedAJAX and HTML entities

 Post Reply Post Reply
Author
EarlyBird View Drop Down
Newbie
Newbie


Joined: 15 September 2006
Status: Offline
Points: 3
Direct Link To This Post Topic: AJAX and HTML entities
    Posted: 17 September 2006 at 5:27am
Hi everyone! I'm trying to develop a new site with AJAX features. One of the features allows members to refresh the content of specific panels on the page. This all works well importing XHTML snippets using AJAX, but as soon as it includes any HTML entities like » the whole thing fails. It's returning the correct code (I tested it with an alert) but when I insert it into the div the HTML entities cause it to not display in Firefox and return a script error in IE. Anyone know how I can use HTML entities in my AJAX XML responses?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Direct Link To This Post Posted: 17 September 2006 at 9:07am
This may not work but it could be the ; coursing the issue in javascript and may need to be escaped try changing ; to the following:-

\;

This should escape the character and hopefully stop the javascript error
Back to Top
EarlyBird View Drop Down
Newbie
Newbie


Joined: 15 September 2006
Status: Offline
Points: 3
Direct Link To This Post Posted: 17 September 2006 at 12:42pm
No joy with that one i'm afraid. Apparently it's to do with the fact that these HTML entities aren't declared within the scope of the XML i'm using to return my XHTML. When the parser sees the entities it throws a fit because it doesn't recognise them.

As these characters can have been input by members of my site, the only way I can think of is by creating a doctype for my XML files that includes all of the HTML entities from the W3C site, but I have no idea how to go about it!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.