Jump to content

Passing multiple select values


esiason14

Recommended Posts

I have several multiple select boxes on a page

 

<div id='tabs0' style='position:absolute; top:0; left:0; visibility: visible; margin: 10px;'>
<select multiple id=1 name=1 style='font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; font-size: 11px; width: 350; height: 180' onChange='add_player(this, "1"); return true;' size=10>
<?php 
    $count = count($cbs_id);
      for($i=0;$i<$count;$i++)
   {
	if ($pos[$i] == "1")
	{
		 {  
	echo "<option value=".$cbs_id[$i].">".$lname[$i].", ".$fname[$i]."\n"; 
	 }
		}
   }
?> 
</select></div>

 

I'm trying to figure out how I can pass multiple values if the user selects more than one.

 

	var c = document.getElementById('1').value;
var fb = document.getElementById('2').value;	
var queryString = "?submit=true&1=" + c + "&2=" + fb;

ajaxRequest.open("GET", "newmlbcompare2.php" + queryString, true);
ajaxRequest.send(null); 

 

If there are multiple c and fb values...how can I pass all of those? Any help would be appreciated!!

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.