Issue with a drop down list

Hi,

I am using this script in a business card form to populate a list of work titles that the user can choose from.
The list is in Norwegian and when selected it also selects a hidden value in English for page 2.
The challenge is that one of the work titles (sjef) in Norwegian has tree different values in English. So it lists the same title tree times.
(sjef=boss of communication, sjef=boss of transport, sjef=boss of company)

Is it possible to add a description to the Norwegian list from the English values that will not be visible on the result page?
Hopefully only for this one work title not for the hole list.
As it is now the user has to go back and change the value after he/she sees the result.

Here is the script:

<?php
require "config.inc.php";
echo "

function fillPos(){
 // this function is used to fill the position list on load

";

$q7=mysql_query("select id, name, en_name from met_pos WHERE parentid=0 ORDER BY name");
echo mysql_error();
while($nt7=mysql_fetch_array($q7)){
echo "addOption(document.drop_list.Pos, '$nt7[id]', '$nt7[name]');";
}// end of while
?>


}
//////////////////

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

Thank you for any help!

Hi,

Would this give you the result you want?


while($nt7=mysql_fetch_array($q7)){
    if ($nt7[name] == 'sjef') {
        echo "addOption(document.drop_list.Pos, '$nt7[id]', '$nt7[name] ($nt7[en_name])');";
    } else {
        echo "addOption(document.drop_list.Pos, '$nt7[id]', '$nt7[name]');";
    }
}

It should give you list options like this:


sjef (boss of communication)
sjef (boss of transport)
sjef (boss of company)

Absolutely:-)
Just what I was hoping for.

Thank you very much!