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.
Link to comment
Share on other sites

[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. 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.