Skip to main content

PHP scroll question 88 Responses

Last post: 1 year, 11 months ago | Thread started: Mar 11, 10, 9:29 a.m.

RespondNew TopicDisable Images

  • 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!

    Mar 11, 10, 9:29 a.m. – Permalink
  • uan

    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 :)

    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 9:34 a.m. – Permalink
  • Claymantis

    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>

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 9:40 a.m. – Permalink
  • Claymantis

    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>

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 9:40 a.m. – Permalink
  • Claymantis

    Sorry for the double post.

    It says my scroll img are there?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 9:41 a.m. – Permalink
  • Claymantis

    I'm not sure what you mean - when you say I didnt output my scroll buttons?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 9:44 a.m. – Permalink
  • acescence

    for whatever reason mysql_num_rows($result) is not greater than 3 and the else clause is being executed

    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 9:44 a.m. – Permalink
  • vaxorcist

    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?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 2:26 p.m. – Permalink
  • nikdaum

    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?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 11, 10, 7:02 p.m. – Permalink

Login or Register to respond to this

Skip to main content