Jump to content

how to getting the following listbox data


naveed.qasim

Recommended Posts

Hi! every body.

This is my first post in this form. Hope u people will help me.

 

I'm using PHP 5.3.

 

I've the following listboxes. From "emp_list" i've double click the value, which goes to "sel_list". I'm selecting multiple values. How can i get these values on the target page using PHP.

 

<html><head>

<script language="javascript">

function moveItem( box1, box2 ){

for ( var i=0; i < box1.options.length; i++ ){

if ( ( box1.options.selected == true ) ){

strItemToAdd = box1.options.text;

box2.options[box2.length] = new Option(strItemToAdd);

box1.options = null;

i--;

}

}

}

</script>

</head><body>

 

<form id="project" name="project" action=""  method="POST">

<select id='emp_list' name='emp_list' size='5' STYLE="width:170;" multiple

onDblclick="moveItem( project.emp_list, project.sel_list)">

<option value='a1'>a1</option>

<option value='a2'>a2</option>

<option value='a3'>a3</option>

</select>

 

<select id='sel_list' name='sel_list' size='5' STYLE="width:170;" multiple

onDblclick="moveItem(project.sel_list, project.emp_list )">

</select>

 

<input type='submit' name='submit' value='submit'>

</form>

 

</body></html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.