Reply to RE: [PHP] php and javascript

Your name:

Reply:


Posted by Mike Ford on 04/12/05 22:39

> -----Original Message-----
> From: Richard Lynch
> To: Marek Kilimajer
>
> On Sun, April 10, 2005 4:32 pm, Marek Kilimajer said:
> > Assuming your form is named "Selection", you will have a javascript
> > array document.forms['Selection'].elements['distID[]'] available. You
> > can try:
> >
> > alert(document.forms['Selection'].elements['distID[]'][0].value);
>
> I can GUARANTEE this will *NOT* work.
>
> You *CANNOT* use [] as part of a 'name' in JavaScript.

That's completely untrue -- I've done it many times with complete success.
The above can even be written more concisely as

alert(document['Selection']['distID[]'][0].value);

Cheers!

Mike


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

[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

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