You are here: Determine contents of listbox « PHP Programming Language « IT news, forums, messages
Determine contents of listbox

Posted by tks423 on 05/03/07 04:45

How can I determine the values of a listbox, both unselected or
selected after submitting the form:

Code:

<select name="sel1" size="10" multiple="multiple">
<? PHP code populates listbox ?>
</select>


Do I have to use Javascript to determine the contents, like in the
pseudo code Javscript below. But how would you pass the Javascript
return value to PHP?

Code:

function listBoxContents(sel1)
{
var selLength1 = sel1.length;
var valuesPresent1 = new Array(sel1.length-1);
var i;
for(i=0; i<=selLength1-1; i++)
{
valuesPresent1[i]=sel1.options[i].valueOf();
}

return valuesPresent1;
}

 

Navigation:

[Reply to this 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

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