Re: html forms and php

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

 



On 31 Jan 2006, at 16:07, Philippe Reynolds wrote:

To resolve this we have to create an array out of our select name:
<select name="trucklist[]" size="12" style="width: 150px" multiple>

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:

Keep the trucklist[] as the select list NAME. This will allow PHP to work.

Add an ID to the select list:

<select id="trucklist" name="trucklist[]" size="12" style="width: 150px" multiple>

Now modify your JavaScript to use this ID instead of the form element name when moving.

function Move(fromListID, toListID)
{
	fromList = document.getElementById(fromListID);
	toList = document.getElementById(toListID);

	etc etc

You can now access the fromList select list in the usual way.

Cheers,

Rich
--
http://www.corephp.co.uk
Zend Certified Engineer
PHP Development Services

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