0
Now it is populating only with a license plate, must be something with my while.
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Ignite UI Required Combined CSS Files -->
<link href="http://cdn-na.infragistics.com/igniteui/2017.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
<link href="http://cdn-na.infragistics.com/igniteui/2017.1/latest/css/structure/infragistics.css" rel="stylesheet" />
<script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
<!-- Ignite UI Required Combined JavaScript Files -->
<script src="http://cdn-na.infragistics.com/igniteui/2017.1/latest/js/infragistics.core.js"></script>
<script src="http://cdn-na.infragistics.com/igniteui/2017.1/latest/js/infragistics.lob.js"></script>
<meta name="author" content="Clube dos Geeks">
<script type="text/javascript" src="jquery/jquery-3.2.1.min.js.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<style>
.combo-label {margin-bottom:.5em;}
</style>
<h4 class="combo-label">Selecione as matrículas:</h4>
<div id="checkboxSelectCombo"></div>
<?php
include 'conexao.php';
$sel= "select matricula FROM usuarios WHERE ativo = 1";
$query = mysql_query ($sel, $conexao) or die(mysql_error());
?>
<script>
<?php
while ($result = mysql_fetch_array($query))
{ ?>
var colors = [
{ Name: "<?php echo $result['matricula']; ?>" },
];
<?php } ?>
$(function () {
$("#checkboxSelectCombo").igCombo({
width: 300,
dataSource: colors,
textKey: "Name",
valueKey: "Name",
multiSelection: {
enabled: true,
showCheckboxes: true
},
dropDownOrientation: "bottom"
});
});
</script>
</body>
</html>
I did not understand the question. I could not run here by the site, but if save and try to play on the host site it runs good. Wanted help for after making select play on the color there the plates.
– Jaimir Tapia
You have to include the php code you are using, because your question is mostly about php and not javascript. It just so happens that the values php will generate will likely be within a javascript block
– Isac