Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/12/2007, 17:02
corvin
 
Fecha de Ingreso: diciembre-2007
Mensajes: 12
Antigüedad: 17 años, 4 meses
Puntos: 0
Re: Dibujar una tabla mediante FUNCTION

Miren, tengo hechos los campos a llenar, ASP no se nada, solo lo de 2 clases, lo que si se es PHP...

Esto es lo que llevo

Código HTML:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
  function CrearInput(tipo,nombre,valor)
    dim crear
	if(tipo="select")then
	  crear="<select name='"& nombre &"'><option>" & valor &"</option></select>"
	else  
	  crear="<input type='"& tipo &"' name='" & nombre &"' value='" & valor & "'>"
	end if  
	CrearInput=crear
  end function 
  response.write(CrearInput("text","Rut","14.333.363-9"))
%>
<form name="form1" method="post" action="">
  <table width="43%" border="1" align="center">
    <tr>
      <td width="20%">Rut</td>
      <td width="80%">
	  <% i=0
	    response.write(CrearInput("text","nota" & i,"14.333.363-9"))%></td>
    </tr>
    <tr>
      <td>Nombre</td>
      <td><% i=1 
	        response.write(CrearInput("text","Nota" & i,"14.333.363-9"))%></td>
    </tr>
    <tr>
      <td>Direccion</td>
      <td><%i=2 
	        response.write(CrearInput("text","nota" & i,"14.333.363-9"))%></td>
    </tr>
    <tr>
      <td>Ciudad</td>
      <td><% 
	        response.write(CrearInput("select","Rut","14.333.363-9"))%>
        </td>
    </tr>
    <tr>
      <td>Tel&eacute;fono</td>
      <td><%i=3 
	        response.write(CrearInput("text","Rut","14.333.363-9"))%></td>
    </tr>
  </table>
</form>
</body>
</html> 
No se me ocurre como podria dibujar una tabla para ese formulario llamando solo funciones... porque si se fijan los campos estan dentro de una tabla, pero, me piden que la tabla sea hecha con funciones... Se puede???