Jump to content

drop down list stops working after 20 records


jeger003

Recommended Posts

I have this:

http://jsfiddle.net/Mxkfr/2/

after adding my mysql query to the drop down it stops working after the 20th record in the first drop down. meaning it wont show up the record of the second drop down It's exactly the 20th. the drop down has 150 records.

http://pastebin.com/G8UJei6A

I put my code on jsfiddle and pastebin because I don't like it coming up on google.

Link to comment
Share on other sites

here it is again.

 


<script>
$(document).ready(function() {
   $("#domains").children('option:gt(0)').hide();
   $("#bts").change(function() {
       $("#domains").children('option').hide();
       $("#domains").children("." + $(this).val() + "").show()
   })
})
</script>
<form action="#" method="get">
<select name="bts" id="bts">
   <option></option>

   <?php
   //mysql_close();
   $query = mysql_query("SELECT DISTINCT bt_name, sd,id FROM db.s WHERE bt_name != 'optimus' ORDER BY id");

   while($botname = mysql_fetch_array($query))
   {
       echo '<option value="'.$botname['id'].'">'.$botname['bt_name'].'</option>';
   }

   ?>

</select>

<select name="domains" id="domains">


   <option></option>

   <?php
   //mysql_close();
   $query = mysql_query("SELECT DISTINCT bt_name, sd,id FROM db.s WHERE bt_name != 'optimus' ORDER BY id");

   while($botname = mysql_fetch_array($query))
   {
       echo '<option value="'.$botname['sd'].'" class="'.$botname['id'].'">'.$botname['sd'].'</option>';
   }

   ?>







</select> 
<input type="submit" name="go"/>
</form>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.