Re: W3C Validator and Post Arrays

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

 



On Thu, 2009-04-02 at 14:23 -0400, tedd wrote:
> At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:
> >Shaun Thornburgh wrote:
> >>Hi,
> >>
> >>We are getting errors when trying to vaildate 
> >>our HTML due to the [ character when using Post 
> >>Arrays:
> >>
> >>Line 173, Column 65:
> >>         character "[" is not allowed in the value of attribute "id"
> >>
> >>Še="filters[calling_url]" 
> >>id="filters[calling_url]" 
> >>value="categories-bulk-ear
> >>
> >>Does anyone know of a way around this?
> >>
> >>Thanks
> >
> >Don't use [] in an ID - it doesn't belong there.
> >If you are not using the ID for a hook, just 
> >drop it - the ID doesn't need to be there.
> >
> >The name attribute is where you want the [] to 
> >post an array, ID does not get sent in a post.
> 
> 
> Ahhh, no.
> 
> Try this:
> 
> http://www.webbytedd.com/bbb/check-box-form/
> 
> It works, shows why and how you can use [] and it validates.
> 
> Cheers,
> 
> tedd
> 
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 
You can use them in the name attribute like you said, but not in the id.
As id's all need to be unique, just output an incremental number next to
the text in the id property, sans [ characters.


Ash
www.ashleysheridan.co.uk


-- 
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