 
			
				23/02/2005, 19:38
			
			
			     |  
        |     |    |    Fecha de Ingreso: julio-2003  
						Mensajes: 1.773
					  Antigüedad: 22 años, 3 meses Puntos: 21     |        |  
  |      Ok voy a checar        mientra aqui les pongo la rutina bien 
porque la pegue el codigo medio mal pero esta bien   
<? 
echo $_POST['campaign_id']."<br>"; 
echo $_POST['questiontext']."<br>"; 
$size_lista = sizeof($_POST['answers']); 
echo "arreglo es de: ".$size_lista;   
?> 
<html> 
<head><title>Comdev One Admin 3.0</title></head>   
<script language=javascript>     
	function addAnswer(answervalue){ 
		if (answervalue != ""){ 
			var opt = new Option(answervalue,answervalue); 
			document.thisform.answer.options.add(opt); 
			var oNewItem = document.createElement("INPUT");	 
	   		document.thisform.children(0).insertAdjacentElemen  t("afterBegin",oNewItem); 
	   		oNewItem.type = "TEXT"; 
	   		oNewItem.name = "answers[]"; 
	   		oNewItem.value= answervalue; 
	   		oNewItem.style.display= "none"; 
	   		document.thisform.answervalue.value=""; 
	   		document.thisform.answervalue.focus(); 
		} 
	}   
	function deleteAnswer(){ 
		var answerlist = document.thisform.answer; 
		for(var i=0; i<answerlist.options.length; i++) { 
			if(answerlist.options[i].selected && answerlist.options[i] != "") { 
				document.thisform.elements(answerlist.options.leng  th-i-1).removeNode(); 
				answerlist.options[i]= null; 
				break; 
			} 
	   	} 
	}     
</script> 
<body topmargin=0 leftmargin=0 bgcolor="#FFFFFF">   
<table border=0 cellpadding=2 cellspacing=0 width=98% align=center> 
<form name=thisform action="form.php" method=post> 
<input type=hidden name=pageaction> 
<input type=hidden name=question_id value=""> 
<tr> 
<td colspan=2><br> 
<br></td> 
</tr> 
<tr> 
<td valign=top width=20%>Campaign</td> 
<td> 
<select name=campaign_id> 
<option value="" >Choose Campaign ...</option> 
<option value="1" >Vote Campaign 1</option> 
<option value="2" >Vote Campaign 2</option> 
<option value="3" selected>programacion en php</option> 
</select></td> 
</tr> 
<tr> 
<td valign=top>Question</td> 
<td><input type=text name=questiontext id=questiontext style="width:330px" value=""></td> 
</tr> 
<tr> 
<td valign=top>Answers</td> 
<td> 
<table border=0 cellpadding=0 cellspacing=0> 
<tr> 
<td><input name=answervalue style="width:160px"> 
<input name="button" type=button onclick="addAnswer(document.thisform.answervalue.v  alue)" value="Add"> 
<input name="button" type=button onclick="deleteAnswer()" value="Del"></td> 
</tr> 
<tr> 
<td><select size=5 name=answer style="width:230px"> 
</select></td> 
</tr> 
</table></td> 
</tr> 
<tr> 
<td valign=top></td> 
<td> 
<input name="button" type=button onclick="document.thisform.pageaction.value='add';  document. thisform.submit()" value=" Add "> 
</td> 
</tr> 
</form> 
</table> 
</body> 
</html>     
				__________________  gerardo           |