drop down list stops working after 20 records
Started by jeger003, Jan 24 2013 05:05 PM
3 replies to this topic
#1
Posted 24 January 2013 - 05:05 PM
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.
#2
Posted 26 January 2013 - 09:10 AM
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.

Did I help you? Feeling generous? Donate to me! || Donate to phpfreaks!
#3
Posted 28 January 2013 - 09:04 AM
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>
#4
Posted 29 January 2013 - 02:38 PM
still messing around with this and it doesnt seem to be my queries.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












