Jump to content

Can PHP 4.3.x Support This Document Object Code?


mmtalon

Recommended Posts

First, I don't know if the code example is deprecated because of a later version of the document object model (DOM). Or, perhaps, the code is designed for a later version of DOM, where PHP 4.3.x won't support the newer version of DOM. I was hoping that someone would recognize the code as being to old or not new enough.

I thought that the PHP server is what translate the javascript to the client computer and that the PHP server would ultimately be the problem. Do correct me if I am wrong on how javascript reaches the client computer.
[quote]PHP 4.3.x won't support the newer version of DOM[/quote]
NO php  supports the DOM. php returns html source code as text, and the DOM is not even created until the browser parses the html.  The DOM is accessable from javascript - not php.  Your DOM support problem is a browser type/version problem.

[code]alert("bodyNode.firstChild.nodeName = " + bodyNode.firstChild.nodeName);[/code]
--I have read that the 'firstChild' object is not supported by ie6 and older ie.  ie7 is supposed to have support.  Your problem is an ie DOM compatability issue. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.