Ciao,
ho il seguente codice in jscript, che estrae dei dati da un file xml, come faccio a impaginarli su più pagine?
grazie
<%
var database = new String(Request.QueryString("db"));
database="prodotti/"+database;
var xmldom = new ActiveXObject("Microsoft.XMLDOM");
xmldom.async = false;
xmldom.load(Server.MapPath(database));
var name = xmldom.getElementsByTagName("product/name");
var price = xmldom.getElementsByTagName("product/price");
var imageUrl = xmldom.getElementsByTagName("product/imageUrl");
var productUrl = xmldom.getElementsByTagName("product/productUrl");
var description = xmldom.getElementsByTagName("product/description");
for (var i=0; i<name.length; i++)
{
with (Response)
{
%>
<div id='prodotto'>
<table width="500" border="0" cellspacing="0" cellpadding="0" height="45">
<tr>
<td rowspan="2" valign='top'>
<%
Write("[img]"+imageUrl[i].text+"[/img]");
%>
</td>
<td width="550" height="5" valign='top'>
<%
Write("<p class='titolo'>"+name[i].text)+"</p>";
%>
</td>
<td width="15%" valign='top'>
<%
Write("<p class='prezzo'>€ "+price[i].text+"</p>");
%>
</td>
</tr>
<tr>
<td width="71%" valign='top'>
<%
Write("<p class='descr'>"+description[i].text+"</p>");
%>
</td>
<td width="15%" valign='bottom' align='right'>
<%
Write("Dettagli");
%>
</td>
</tr>
</table>
</div>
<%
}
}
%>

Rispondi quotando

