RE: [PHP] JavaScript and PHP

From: Date: Fri, 16 May 2008 22:05:03 +0000
Subject: RE: [PHP] JavaScript and PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-274460@lists.php.net to get a copy of this message
At 4:01 PM +0100 5/16/08, Ford, Mike wrote:
On 14 May 2008 21:21, tedd advised:
At 7:31 PM +0100 5/14/08, Mário Gamito wrote:
Hi, I have this HTML/JS page that switches images clicking on the radio buttons and call template.php with the image ID as parameter: http://portulan-online.net/einstein.html Now, I need to make it a PHP page, because it is going to receive a parameter from the URL that calls it and pass it as is to template.php
Mário: The key here to remember is that javascript uses ID and php uses NAME for inputs.
That's incorrect. A form will function perfectly well with only name= attributes, and no ids, and it's quite possible for JavaScript to address the form elements using only the names (in fact, it's easier than via the ids as there's a short syntax for it!).
Incorrect or not, it works. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#274460) next »