RE: html forms and php

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

 



On 31 January 2006 16:08, Philippe Reynolds wrote:

> I added the square brakets to the name...now when I select
> all the options
> on the list I can read all values individually.
> 
> Here is problem...my javascripts have stopped working, I
> can't move options
> from one list to the next.  Here is the javascript I use
> currently...I would like help in modifing it so that it may work
> while using the 
> brakets on the
> name of the select:

Use the Javascript identity of x.y with x["y"], thusly:

>    <input type="button" name="SelectAll" value=">> All" style="width:
> 100px;" onClick="MoveAll(fleetForm.trucklist,
> fleetForm.reportinglist)"><br>

   onclick="MoveAll(fleetForm['trucklist[]'], fleetForm['reportinglist[]'])"

No need to mess about with the complications of DOM and getElementById -- it's much more backward compatible for older browsers, as well, since that identity has existed since day one of JavaScript.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@xxxxxxxxxxxxxx
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


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

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