jeger003 Posted January 24, 2013 Share Posted January 24, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/273609-drop-down-list-stops-working-after-20-records/ Share on other sites More sharing options...
.josh Posted January 26, 2013 Share Posted January 26, 2013 Likely your problem is with your server-side code; at face value I don't see anything wrong with the js. If you posted your server-side code on pastebin, the link is invalid, so I cannot see it. Quote Link to comment https://forums.phpfreaks.com/topic/273609-drop-down-list-stops-working-after-20-records/#findComment-1408371 Share on other sites More sharing options...
jeger003 Posted January 28, 2013 Author Share Posted January 28, 2013 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> Quote Link to comment https://forums.phpfreaks.com/topic/273609-drop-down-list-stops-working-after-20-records/#findComment-1408754 Share on other sites More sharing options...
jeger003 Posted January 29, 2013 Author Share Posted January 29, 2013 still messing around with this and it doesnt seem to be my queries. Quote Link to comment https://forums.phpfreaks.com/topic/273609-drop-down-list-stops-working-after-20-records/#findComment-1409017 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.