PHP scroll question
- Started
- Last post
- 8 Responses
- Claymantis
Hi there,The current page http://www.odoughs.com/products.…
has a list of item on the left. But as you can see the four item is cut off.On this page
http://www.odoughs.com/products.…
You can see that the items scroll.I need the product.php to scroll.
How would I go about doing this? It looks like the scrolling is generated by the PHP??THanks!
- uan0
even if it sounds weird to you...the php doesn't make any scroll...
anyway...your 1st page does scroll, you just forgot to output the scroll-buttons on that page...try scroll with mousewheel, if you don't belive me...
...it's the div that contains the 'products_up.gif' and 'products_down.gif' in the 2nd page.
hope this helps you in some way :)
- Claymantis0
on my products.php page I have...
<div id="scroll_links">
<?php
mysql_select_db($db_dbase, $connect);
$result = mysql_query("SELECT * FROM products WHERE `cat` = '$catid' ORDER BY `name` ASC");if (mysql_num_rows($result) > 3) {
?>
<a href="#" class="click_up_by_134" title="Click to scroll"><img src="images/products_up.gif" alt="up" /></a>
<a href="#" class="click_down_by_134" title="Click to scroll"><img src="images/products_down.gif" alt="up" /></a>
<?php
} else {
?>
<div id="scrolldeaden"></div>
<?php
}
?>
</div>
- Claymantis0
on my products.php page I have...
<div id="scroll_links">
<?php
mysql_select_db($db_dbase, $connect);
$result = mysql_query("SELECT * FROM products WHERE `cat` = '$catid' ORDER BY `name` ASC");if (mysql_num_rows($result) > 3) {
?>
<a href="#" class="click_up_by_134" title="Click to scroll"><img src="images/products_up.gif" alt="up" /></a>
<a href="#" class="click_down_by_134" title="Click to scroll"><img src="images/products_down.gif" alt="up" /></a>
<?php
} else {
?>
<div id="scrolldeaden"></div>
<?php
}
?>
</div>
- Claymantis0
Sorry for the double post.
It says my scroll img are there?
- Claymantis0
I'm not sure what you mean - when you say I didnt output my scroll buttons?
- acescence0
for whatever reason mysql_num_rows($result) is not greater than 3 and the else clause is being executed
- vaxorcist0
It seems to just work the way it's supposed to.... did you get a strange client call that caused you to wonder if all is well?
- nikdaum0
In both examples, the list is scrolling to only show one extra product. I know down the line there may be more there, but if there are only that many, couldn't the spacing between them be reconfigured so no scrolling was necessary to begin with?