Re: php+ ajax

From: Date: Tue, 21 Feb 2006 09:39:10 +0000
Subject: Re: php+ ajax
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-230793@lists.php.net to get a copy of this message
Kim Christensen wrote:
On 2/20/06, David Dorward <dorward@yahoo.com> wrote:
Element ids may not contain square brackets in HTML documents.
Get your facts straight, David. Square brackets works fine in HTML
David has his facts straight, just because something works (for you) doesn't make it correct (MARQUEE tag anyone?): <quote from="http://www.w3.org/TR/html4/types.html#type-name"> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). </quote> what I do usually is misuse the square brackets in the name - to get the arrays in php - and use a different string for the id (one that is technically) valid for use in javascript. Kim do the escaped sqaure brackets work in all majors browsers as far as you know?
documents as long as you escape the ID when you need to reference them by JS. -- Kim Christensen kim.christensen@gmail.com


« previous php.general (#230793) next »