responseHTML.js not working in Dafari

Archives of the forum. Compatibility of the responseHTML-like attribute with browsers.

Forum
Mon, 15 Sep 2008 08:14:11

crashguy

Hi There, I've implemented this into my website and works great in all browsers OTHER then safari! Not sure why this is, but hoping people might have some idea why this would be?? This is safari 3.0 on both mac and windows. Even the ajax-dom-html.html doesn't work? Thanks, crashguy
Fri, 19 Sep 2008 14:56:02

Administrator

Hello, The first demo in the article works for me with Safari and Chrome. They share the same renderer, Webkit. The second demo with DOM does not work for both. We will try to solve the problem, sorry...
Fri, 19 Sep 2008 17:20:04

Administrator

This is now fixed. Webkit does not support the DOM method namedItem() of HTMLCollection, I have replaced it by item(). The script have been tested under Firefox, IE, Opera, Safari and Chrome. I have also added an archive that contains all the demos and all the files required for them to be tested locally.
Mon, 22 Sep 2008 01:31:28

crashguy

Thanks for looking into this. Just a question With the line:
var message = responseHTML.getElementsByTagName("div").item(1).innerHTML;
I was looking for a specific tag with an ID to be loaded which was what i was working with this. How do i do the same with this code? Like does the 'item(1)' suggest the first item of this type on the page being loaded or? My original code was:
var message = responseHTML.getElementsByTagName("table").item("indexTable").innerHTML;
Thanks, crashguy
Mon, 22 Sep 2008 01:36:38

crashguy

Hmmm well it seems to work now, but i've got the script loading within ThickBox and it seems to not want to work within thickbox... Again this is only an issue with safari. Thanks crashguy
Thu, 25 Sep 2008 19:43:33

Administrator

var message = responseHTML.getElementsByTagName("table").item("indexTable").innerHTML;
This should work too, it depends upon the browsers. Thickbox is a tool to display messages in a window apparently. It modifies dynamically the document by adding tags. This may interact differently with responseHTML.js depending on the browser. The lightbox on this site could work better as it does not use DOM and does not change the document structure. Yes, its drawback is that it look better on short pages as it does not float over the content.
© 2008-2013 Xul.fr