May 2003
Intermediate to advanced
592 pages
14h 28m
English
Despite its limitations and cross-browser compliance issues, JavaScript is still a very popular and useful technology in today’s Web pages. Unfortunately, many new PHP programmers have difficulty grasping how PHP and JavaScript interact and differ.
The most significant difference between the two languages is that JavaScript is client-side (meaning it runs in the Web browser) and PHP is server-side. Therefore, JavaScript can detect the size of the browser in pixels, create pop-up windows, and make image mouse-overs, whereas PHP cannot. So while PHP cannot do certain things that JavaScript can, PHP can be used to make JavaScript.
Sending JavaScript Data to PHPAs the example in this section shows, sending data from PHP to JavaScript ... |