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
https://forums.phpfreaks.com/topic/51141-passing-multiple-select-values/
Share on other sites

Hope this will help you

 

http://rajshekhar.net/blog/archives/85-Rasmus-30-second-AJAX-Tutorial.html

 

Can I ask you a favor, i am trying to create a pagination using php ajax, and i am stuck, any suggestions or idea would be greatly appreciated (My thread is listed with a subject - How do display data from sql php/ajax).

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.