race_90
03-16-2007, 12:50 AM
I have a code and works very well to show a down to up banner of the products i wanna put in my page, but
the way to show the products are in sequential form and i wanna make random show. I heard randomize function can do but i don hae idea on how it work or modify the script to do this the example of a this banner is on: http://www.trainingprofessionals.com/
Look on the right the moving random products in this page is ok like i need random. Now the code i have is similar to this but like i said the products are in sequential form. IŽll paste the script code maybe you can help me to modify to make the script show the products in random form. This script use a database routine i need ot put in my page and is working 100% only have randomize. The Script is:
Thank You
<table border="1" align="right" cellpadding="3" cellspacing="3" bordercolor="#FFFFFF">
<tr>
<th valign="top" bordercolor="#003399" bgcolor="#CCCCFF"><div align="center">Random Products</div></th>
</tr>
<tr>
<td bordercolor="#003399">
<div style="width:150;text-align:center;">
<marquee behavior="scroll"
direction="up"
height="350"
width="150"
scrollamount="1"
scrolldelay="70"
truespeed="true" onmouseover="this.stop()" onmouseout="this.start()">
<div align="center">
<%
Dim rsTemp1
'Get Featured Products
mySQL="SELECT idProduct,description,price,smallImageUrl " _
& "FROM products " _
& "WHERE active = -1 " _
& "AND homePage = -1 " _
& "ORDER BY sortOrder ASC,idProduct DESC "
set rsTemp1 = openRSexecute(mySQL)
while not rsTemp1.eof
response.write "<a href=../Scripts/prodView.asp?idproduct=" & rsTemp1("idProduct") & "><img src=" & pImagesDir & "/" & rsTemp1("smallImageUrl") & " border=0><br />" & rsTemp1("Description") & "<br /><b>" & moneyS(rsTemp1("Price")) & "</b></a><br /><br />"
rsTemp1.movenext
Wend
closeRS(rsTemp1)
%>
</div>
</marquee>
</div>
</td>
</tr>
</table>
the way to show the products are in sequential form and i wanna make random show. I heard randomize function can do but i don hae idea on how it work or modify the script to do this the example of a this banner is on: http://www.trainingprofessionals.com/
Look on the right the moving random products in this page is ok like i need random. Now the code i have is similar to this but like i said the products are in sequential form. IŽll paste the script code maybe you can help me to modify to make the script show the products in random form. This script use a database routine i need ot put in my page and is working 100% only have randomize. The Script is:
Thank You
<table border="1" align="right" cellpadding="3" cellspacing="3" bordercolor="#FFFFFF">
<tr>
<th valign="top" bordercolor="#003399" bgcolor="#CCCCFF"><div align="center">Random Products</div></th>
</tr>
<tr>
<td bordercolor="#003399">
<div style="width:150;text-align:center;">
<marquee behavior="scroll"
direction="up"
height="350"
width="150"
scrollamount="1"
scrolldelay="70"
truespeed="true" onmouseover="this.stop()" onmouseout="this.start()">
<div align="center">
<%
Dim rsTemp1
'Get Featured Products
mySQL="SELECT idProduct,description,price,smallImageUrl " _
& "FROM products " _
& "WHERE active = -1 " _
& "AND homePage = -1 " _
& "ORDER BY sortOrder ASC,idProduct DESC "
set rsTemp1 = openRSexecute(mySQL)
while not rsTemp1.eof
response.write "<a href=../Scripts/prodView.asp?idproduct=" & rsTemp1("idProduct") & "><img src=" & pImagesDir & "/" & rsTemp1("smallImageUrl") & " border=0><br />" & rsTemp1("Description") & "<br /><b>" & moneyS(rsTemp1("Price")) & "</b></a><br /><br />"
rsTemp1.movenext
Wend
closeRS(rsTemp1)
%>
</div>
</marquee>
</div>
</td>
</tr>
</table>