PDA

View Full Version : Display recordset in a fixed size div


robert475
12-22-2010, 12:40 PM
Hi I have a fixed size div with a width of 771px height of 546px.

It is a book as seen here: link (http://rhino-products.biz/rob/downloads.asp)

On the left page i have a recordset which displays fine.

My question is that i want to add more products to the database so of course the recordset is goin to get bigger. I would like to loop through the records until it gets to the bottom of the left page and then the rest of the records be displayed on the right page of the book.

Is this possible? Can anyone advise on how to do this please?

Old Pedant
12-22-2010, 06:44 PM
Sure it's possible. But not without seeing what your ASP code looks like.

robert475
12-23-2010, 09:24 AM
Sure


<div id="mainContent">
<div id="bookDownloads">

<div id="downloadItems">
<script>
function validate(thisForm){
var chkCount=0;
for(var a=0;a<thisForm.multiple.length;a++){
if(thisForm.multiple[a].checked==true){
chkCount++;
}
}
if(chkCount<1 ){
alert("Please select a minimum of one item to download");
return (false);
}
return (true);
}
</script>

<form name="downloads" action="zip.asp" method="post" onsubmit="return validate(this);">
<table width="40%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="64%"><div align="left"></div></td>
<td width="22%"><div align="center"></div></td>
<td width="14%"><div align="center">
<input type="checkbox" class="multiple_all">
</div></td>
</tr>
<tr>
<td width="64%"></td>
<td width="22%"></td>
<td width="14%"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="64%"><div align="left" class="tableTitle">Products</div></td>
<td width="22%"><div align="center" class="tableTitle">Images</div></td>
<td width="14%"><div align="center" class="tableTitle">Datasheet</div></td>
</tr>
<%while not downloadsRs.EoF%>
<tr>
<td class="productListing"><%=downloadsRs("ProductTitle")%></td>
<td><div align="center">
<input type="checkbox" name="multiple" value="rhino-products.biz\wwwroot\rob\<%=downloadsRs("Zip")%>"/>
</div></td>
<td><div align="center">
<input type="checkbox" name="multiple" value="rhino-products.biz\wwwroot\rob\<%=downloadsRs("Datasheet")%>"/>
</div></td>
</tr>
<%downloadsRs.MoveNext
Wend%>
</table>

<div id="saveBtn"><input src="assets/img/saveBtn.png" value="Download Zip" type="image" /></div>

</form>
</div>

</div>

Old Pedant
12-23-2010, 08:14 PM
Ummm...I was hoping you would show the HTML that defines *both* the left and right side of the "book".

That is, do you have a <div> for the left side *and* a <div> for the right side?

Or do you not actualy have any right side defined at this time??

robert475
01-04-2011, 03:25 PM
Ummm...I was hoping you would show the HTML that defines *both* the left and right side of the "book".

That is, do you have a <div> for the left side *and* a <div> for the right side?

Or do you not actualy have any right side defined at this time??

Both pages are in one div (<div id="bookDownloads">) i havent set it up for the right hand side as yet.