<%@ Language=VBScript%>
<!-- #include file="conn.asp" -->
<%
Dim oRs, nReg
Set oRs = oConn.Execute("CustomersAll",nReg,4)
%>
<script type="text/javascript">
function showHint(str) {
if (str.length == 0) {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "orders.asp?q=" + str, true);
xmlhttp.send();
}
}
</script>
<html>
<body bgcolor="#E0EAFC">
<h3>Listado de Clientes al: <% =Now() %></h3>
<table border=1 width=100% cellspacing="1" cellpadding="2">
<tr>
<th>Id</th>
<th>Compañia</th>
<th>Dirección</th>
<th>Ciudad</th>
<th>País</th>
<th>...</th>
</tr>
<% Do While Not oRS.EOF %>
<tr bgcolor="#FFFFFF">
<td><input type="button" value="<%=oRs(0)%>" onclick="showHint(this.value)"></td>
<td><%=oRs(1)%></td>
<td><%=oRs(2)%></td>
<td><%=oRs(3)%></td>
<td><%=oRs(4)%></td>
<td><a href="/vfp/editcustomer.asp?cId=<%=oRs(0)%>">Editar</a></td>
</tr>
<%
oRs.MoveNext
Loop
oRs.Close
oConn.Close
Set oRs = Nothing
Set oConn = Nothing
%>
</table>
<p>Registros: <%=nReg%></p>
</body>
<p>Orders: <span id="txtHint"></span></p>
</html>