[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - Multiple multi select boxes
Advertisement

Multiple multi select boxes

Moderators: Calcifer, slothy

Multiple multi select boxes

Postby oabkj » Mon Mar 12, 2007 6:05 pm

Last edited by oabkj on Mon Mar 12, 2007 7:14 pm, edited 1 time in total.
oabkj
 
Posts: 4
Joined: Mon Mar 12, 2007 5:44 pm

Postby oabkj » Mon Mar 12, 2007 9:58 pm

oabkj
 
Posts: 4
Joined: Mon Mar 12, 2007 5:44 pm

Postby Batalf » Tue Mar 13, 2007 12:13 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby oabkj » Tue Mar 13, 2007 12:32 am

oabkj
 
Posts: 4
Joined: Mon Mar 12, 2007 5:44 pm

Postby Batalf » Tue Mar 13, 2007 12:53 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby oabkj » Tue Mar 13, 2007 7:55 am

I had disabled that line as well, so I tried to enable it, but it made no difference.

I managed to make a fix, that works for my purpose.

I put in this function:

function selectItem(toBox, userResult)
{
var obj = document.getElementById(toBox);
var result = "";
for(var no=0;no<obj.options.length;no++)
{
result += obj.options[no].text;

if (no != obj.options.length-1) result += ",";
}
document.getElementById(userResult).value = result;
}

And call it in the form, with a onclick and ondblclick to input data into a new input element called userResult (plus index number of toBox), like so.

onclick="selectItem('toBox1', 'userResult1');â€
oabkj
 
Posts: 4
Joined: Mon Mar 12, 2007 5:44 pm


Return to Form widget questions

Who is online

Users browsing this forum: No registered users and 5 guests

cron