Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Controlling a Select Menu # of rows

Posted 09 Oct 2006 18:06:25
1
has voted
09 Oct 2006 18:06:25 Javier Castro posted:
Hi...I'm wondering if anyone knows how to control the number of rows that a Select menu displays once you click on it.
I have this jump menu that I need to control. The below sample does show all the rows, but a it destroys the pull down feature.
<select onChange="MM_jumpMenu('parent',this,0)" size="23">

I want to figure this out because some browsers like firefoxs do not show all the items of my menu and users need to scroll.

If anyone can give me an address or a hint where I can find the soluiton will be appreciated. Thanks.

Replies

Replied 10 Oct 2006 16:45:40
10 Oct 2006 16:45:40 Roddy Dairion replied:
Well in your SQL script you need to add <pre id=code><font face=courier size=2 id=code>LIMIT 0, $limit</font id=code></pre id=code>
$limit will be the amount of rows you want to display on page. So if your jump menu's put a param with the number of rows you want to display like this
<pre id=code><font face=courier size=2 id=code>
&lt;option value="link/page.php?limit=25"&gt;25&lt;/option&gt;
&lt;option value="link/page.php?limit=50"&gt;50&lt;/option&gt;
&lt;option value="link/page.php?limit=75"&gt;75&lt;/option&gt;
&lt;option value="link/page.php?limit=100"&gt;100&lt;/option&gt;
</font id=code></pre id=code>.
Then set var $limit
$limit = $_GET['limit'];
Remember if you have any other param in the link put them as well.
Replied 11 Oct 2006 04:59:13
11 Oct 2006 04:59:13 Javier Castro replied:
Hi Roddy.
I have no dynamic values to input to my pull down menu. And I'm only using whatever javscript DW spits out. so my &lt;select onChange="MM_jumpMenu('parent',this,0)" size="23"&gt; is part of that DWMX2004 code.

Now, i know that 23 is the value that I want for my menu size. But I have no clue to make it so it only shows 23 onChange="MM_jumpMenu"

I have no SQL or PHP. However, your input is appreciated. If you cna convert that to javascript, wow would be fantastic.

Cheers.

Javier

Reply to this topic