Re: Multiselect List

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

 



It's not a problem. Just refer to it using elements[]

document.form_name.elements["fieldname[Value]"]


On May 18, 2005, at 2:59 PM, Ryan Jameson ((USA)) wrote:

That's not the problem. The problem is referring to the listbox via
javascript. It doesn't like the format: formName.listBoxName[].value it
has no problem with formName.listBoxName.value but then PHP doesn't seem
to handle it correctly.


<>< Ryan

________________________________

From: Dimiter Ivanoff [mailto:e_ra_se_r@xxxxxxxxx]
Sent: Wednesday, May 18, 2005 12:25 PM
To: Ryan Jameson (USA)
Subject: Re:  Multiselect List


Place the countries in array. Name the select with your array name.

<select name="<?=$yourarrayname?>" >

and for the <option> use as value the keys from the array.Where your
keys may be the IDs of the countires from the db.

"Ryan Jameson (USA)" <RJameson@xxxxxxxxxxx> wrote:

	Hey Guys,
	
	I'm populating a multiselect list with countries from my
database. PHP
	seems to require the name contain array brackets, ie. myName[].
The
	problem I'm having is referring to the select list via
javascript when
	the name contains the brackets. Anyone know how?
	
	Thanks.
	<>< Ryan
	
	--
	PHP Database Mailing List (http://www.php.net/)
	To unsubscribe, visit: http://www.php.net/unsub.php
	
	

________________________________

How much free photo storage do you get? Store your holiday snaps for
FREE with Yahoo! Photos. Get Yahoo! Photos
<http://us.rd.yahoo.com/mail/uk/taglines/default/photos/*http:// uk.photo
s.yahoo.com/>


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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux