![]() |
|
|
+ Search |
![]()
|
Sep 30th, 2002 15:49
Alex Dean, atu, Jenni Koskenpää, Ashish Chamoli, Alex Dean
Here are some responses to when I posted the same problem... You can refer to the select element by number instead of name in JS, but this quickly becomes a problem because it breaks every time you add a form input above the select. I want to name a SELECT 'someSelect[]' for PHP, but I think the '[]' are illegal in JS. Help. http://www.faqts.com/knowledge_base/view.phtml/aid/16885 ------------------------------------------------------------- ------------------ Just add ID="ListBoxName" to your existing listbox, after alteration which will look like : Name="ListBoxName[]" ID="ListBoxName" and thereafter it will solve the problem of different names for JavaScript and PHP. Take Care, Ashish Chamoli ------------------ Above doesn't work with Netscape so I prefer naming your script like below: <select name="var[]" multiple> And Javascript like: variable = documents.forms[0].elements['var[]']; See more help: http://www.php.net/manual/en/faq.html.php -Jenni