...

View Full Version : Help to make a product move banner random



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>

SSJ
03-16-2007, 07:00 AM
Visit this:
http://lists.evolt.org/archive/Week-of-Mon-20040315/156878.html

Hope this will help you...

race_90
03-16-2007, 06:27 PM
Now to finalize my banner i modified the same script to make go to right to left look this part i modified:

<div style="width:150;text-align:center;">
<marquee behavior="scroll"
direction="up"

with this:

<div style="width:150;text-align:center;">
<marquee behavior="scroll"
direction="left"

Now the problem is like the picture is looking. All the products appears at the same time making in the height of the table inmense i need to make go right from left but not at the same one by one like in the UP SCROLL that comes from DOWN to UP one bye one. Look the picture of the bad right from left:

http://189.158.237.66/examplebanner1.jpg

SSJ
03-17-2007, 05:21 AM
Now the problem is like the picture is looking. All the products appears at the same time making in the height of the table inmense i need to make go right from left but not at the same one by one like in the UP SCROLL that comes from DOWN to UP one bye one. Look the picture of the bad right from left

I really didn't get this...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum