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>
<option value="link/page.php?limit=25">25</option>
<option value="link/page.php?limit=50">50</option>
<option value="link/page.php?limit=75">75</option>
<option value="link/page.php?limit=100">100</option>
</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.
$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>
<option value="link/page.php?limit=25">25</option>
<option value="link/page.php?limit=50">50</option>
<option value="link/page.php?limit=75">75</option>
<option value="link/page.php?limit=100">100</option>
</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 <select onChange="MM_jumpMenu('parent',this,0)" size="23"> 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
I have no dynamic values to input to my pull down menu. And I'm only using whatever javscript DW spits out. so my <select onChange="MM_jumpMenu('parent',this,0)" size="23"> 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