Lo siento coloco directo el url de img. ya que no me deja mostrarlo asi
http://gyazo.com/eda354c0e084ae20f27238851d8bd065
Y en efecto amigo es algo parecido lo que deseo hacer hasta ahora he logrado juntar algo como esto:
Esta incompleto pero bueno era solo por intentar los combos Marca y Descripcion yo los genero dsd la BD, pero lo que quisiera es q cuando le de agregar vaya haciendo una lista de los Articulos cojiendo el value(el value lo pasaria en cajas de textos ocultos) y el text option como dices tu
Gracias por la pronta respuesta.
aqui el codigo:
Cita: <html>
<head>
<title>Crear Campo de texto</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
icremento =0;
function crear(obj) {
icremento++;
field = document.getElementById('prueba');
contenedor = document.createElement('div');
contenedor.id = 'div'+icremento;
field.appendChild(contenedor);
boton = document.createElement('input');
boton.type = 'text';
boton.name = 'text'+'[]'+icremento;
boton.value = document.getElementById("descripcion").value;
contenedor.appendChild(boton);
boton = document.createElement('input');
boton.type = 'button';
boton.value = 'Borrar';
boton.name = 'div'+icremento;
boton.onclick = function () {borrar(this.name)}
contenedor.appendChild(boton);
}
function borrar(obj) {
field = document.getElementById('prueba');
field.removeChild(document.getElementById(obj));
}
</script>
</head>
<body>
<form name="form1" method="POST" action="prueba2.php">
<fieldset id="field">
<table width="891" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="117" align="right">Tipo Articulo :</td>
<td width="178" align="left"><label for="select"></label>
<input name="tipo_articulo" type="radio" id="radio" value="" />
Equipo
<input name="tipo_articulo" type="radio" id="radio2" value="" />
Material</td>
<td width="85" >Descripción :</td>
<td width="106" ><select name="descripcion" id="descripcion">
<option value="0">Seleccionar</option>
<option value="1">algo</option>
<option value="2">otra cosa</option>
</select></td>
<td width="52" align="right">Marca:</td>
<td width="104" align="right"><select name="marca" id="marca">
<option value="0">Seleccionar</option>
<option value="1">algo</option>
<option value="2">otra cosa</option>
</select></td>
<td width="70" >Cantidad </td>
<td width="179" ><span style=" width:40px;">
<input name="2" type="text" id="2" value="" size="10" readonly>
</span>
<div id="capa_cantidad2" style=" width:40px;"></div>
<div id="capa_cantidad" style=" width:40px;"></div></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="0" align="left"></td>
<td><div id="prueba"></div> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p>
<input type="button" value="Agregar" onClick="crear(this)">
<input name="save" type="submit" value="Guardar" onClick="enviar(this)">
</p>
</fieldset>
</form>
</body>
</html>