Re: JavaScript to PHP?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: JavaScript to PHP?

From: AndrewTK <atkedzierski@gmail.com>
Date: Thu Mar 30 2006 - 14:22:17 CEST

The ultimate answer would be no, taking into account the "everything"
clause:

PHP is executed on the server, before the page is sent back to the
browser. It can interact with databases, it can see the server's
filesystem (within set restrictions), doing file I/O, and do other
things where the server would be involved.

JavaScript is executed in the browser, its context is solely the page
in which it is encoded (with a few exceptions eg windows that it opens,
..), parses the DOM of said page and change various properties of the
browser (show/hide elements of the browser, change status bar text,
move elements on a page continuously etc) which cannot be done via PHP.
Moreover JavaScript can catch, react to and manipulate user actions
(mouse clicked, button pressed, key held down) which PHP cannot have
access to.
Received on Mon May 1 02:44:57 2006