Reply to Re: [PHP] javascript, forms and php

Your name:

Reply:


Posted by Brent Baisley on 10/21/34 11:33

You should have posted this to a javascript board, it has nothing to
do with PHP. That said, if the form field name contains special
characters, like [], you can reference it like this:
document.formname.elements['checkbox1[]'].

Use the elements[] reference style.

On Dec 1, 2005, at 12:42 PM, Kelly Meeks wrote:

> Hi all,
>
>
>
> I'm hoping someone can help me with this problem.
>
>
>
> I'm using javascript for some client side field validation in a form
> (method=post) that gets managed via php.
>
>
>
> This particular form makes extensive use of checkboxes. I've
> always like
> how when named properly (field name of "checkbox1[ ]"), php will
> pass that
> variable as an array that contains all the values selected in the
> form.
> Very handy. BUT,
>
>
>
> How do you then reference that variable via javascript to do any
> client-side
> validation? The code I use makes reference to the field's id, and
> it still
> doesn't seem to check things properly.
>
>
>
> Is there any way around this, or what am I missing?
>
>
>
> TIA,
>
>
>
> Kelly
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация