- Create Account

Suggested improvements for next version

Forums > Other DHTML / JavaScript > Suggested improvements for next version
Author
Message

1) legolas558 Group: Members
Posts: 1 Joined: 17 May 2006 Location: Giedi Prime IP: 151.47.--.--
Hi, I am using HTMLHTTPREQUEST and I have edited it to suit my needs: I needed to exchange HTML snippets between server and client, no complex DOM handling.
I have edited the component and I have made the following changes/improvements:

- all data is packed through htmlentities() (PHP function http://php.net/rawurlencode ) into an XML wrapper with a proper CDATA section (data is safely exchanged as XML compliant);
- IE7 support through emission of rawurlencoded() RFC 1738 data packed into the same XML wrapper (explorer is tricky with HTML data http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html and javascript lacks of HtmlDecode() function, this way the best solution is to use the core unescape() function of javascript and to supply properly encoded data from the server);
- data is returned as xmlhttp.responseText when possible, so that the HTML snippet can be directly extracted;
- removed submitInto(), addEvent() and other functions to use only the core Transport layer (I like light-weight ;)

Note:  I have not used data submission through Ajax because _it is not a good practice_...

Note 2: btw, the example is not working on IE7...you may consider adding some compatibility fixes, even if I do not use that browser and personally don't care if you do ;)

Note  3: I have had troubles accessing the XML DOM under the same buggy browser named above; does somebody have a working snippet to access the first node in all IE5+ versions ?

Note  4: there is some problem with the *smart* XmlHttp manager since it does not actually work under IE seven.

I found this cross-browser component very good! As soon as I release my FOSS project I will send you a note.

Thanks
Love is like life, until it lasts everything goes right...

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 202.36.--.--
Thanks for your post -- I wasn't aware that the elves became Harkonnen upon retirement ;).

Yes,  I would very much like web browser developers to agree on a standardised way of serialising/unserialising (X)(HT)ML markup!

I do have a more recent version at /test/ which has an IE7b2 patch applied, so it's now fully functional under that browser. It also includes a fallback to responseText in other browsers too so it can load plain text files as well as valid XML. Give it a whirl and see what else needs tweaking from here!

Good luck - Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.