Re: php+ ajax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kim Christensen wrote:
On 2/20/06, David Dorward <dorward@xxxxxxxxx> 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@xxxxxxxxx


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux