ok. thanks again for the time spend reading this.
this code adds 2 controls in html form but it places in top of the
form.
i want this
control1 control2
control1 control2
control1 control2
but i have this
control1 control2 control1 control2 control1 control2 control1
control2
control1 control2 control1 control2 control1 control2 control1
control2
this is the code... just copy and paste
//----------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CONTRARE CIBO</title>
<link rel="stylesheet " type="text/css" href="./CSS/FORMATO.css">
<script type=text/javascript>
function add(n,frmName){
var hfield = document.create Element('input' );
hfield.setAttri bute('type', 'text');
hfield.setAttri bute('name', 'factura');
hfield.setAttri bute('value', '');
frmName.appendC hild(hfield);
frmName.somenam e = hfield;
frmName.element s.somename = hfield;
frmName.insertA djacentElement( "beforeBegin",h field);
var hfield = document.create Element('input' );
hfield.setAttri bute('type', 'text');
hfield.setAttri bute('name', 'cantidad');
hfield.setAttri bute('value', '0');
frmName.appendC hild(hfield);
frmName.somenam e = hfield;
frmName.element s.somename = hfield;
frmName.insertA djacentElement( "beforeBegin",h field);
}
</script>
<pre>Ingresa las facturas y los datos correspondiente s</pre>
</head>
<body>
<form action="guarda_ Contrarecibo.js p" method="get"
name="Contrarec ibo">
<table align="center" bgcolor="#00fff f" border="2" cellpadding="5"
cellspacing="0" >
<td align="left"> Ingresa el numero de factura </td>
<td align="left"> Ingresa la cantidad de la factura</td>
</table>
<div><input type="text" name="cantidad" maxlength="100"
value="cantidad "/>
<input type="text" name="factura" maxlength="100" /
value="factura" ></div>
<input class=button type=button value="Agregar"
onclick=add(thi s,Contrarecibo) ><br>
<button type="submit" >Guardar</button>
<button type="reset">Bo rrar</button>
</form>
</body>
</html>