View Single Post
  #17  
Old 06-09-2008, 07:28 PM
 
pdubya1632 pdubya1632 is offline
 

Newbie
  
Join Date: Jun 2007
Posts: 1
 

Default Re: Let Customer choose number of products displayed on page

Excellent post and exactly something I needed...except for one thing -> the onchange in the form provided in post #2 gave this error: "document.product_per_page_form has no properties"

So instead of
onchange="javascript: document.product_per_page_form.submit();"
I used
onchange="this.form.submit()"
which fixes the problem

I then stripped out the unnecessary name attribute in the form tag and the all option (since that would have been overkill for me), and added an id so I could apply styles:

Code:
<form method="POST" action="/change_ppp.php" id="pppForm"> Show products per page <select name="ppp" onchange="this.form.submit()"> <option value="12" {if $products_per_page eq 10}selected{/if}>12</option> <option value="20" {if $products_per_page eq 20}selected{/if}>20</option> <option value="30" {if $products_per_page eq 30}selected{/if}>30</option> <option value="50" {if $products_per_page eq 50}selected{/if}>50</option> <option value="75" {if $products_per_page eq 75}selected{/if}>75</option> <option value="100" {if $products_per_page eq 100}selected{/if}>100</option> </select> </form>

I successfully tested it in PC Firefox & IE7, Mac Firefox & Safari. You can see it in action here: http://www.shopbettylin.com/home.php?cat=249
__________________
X-Cart Gold
Version 4.1.9

--wrightmight.com--
Reply With Quote