Dynamic Dropdown and Value Printing?

Asked

Viewed 38 times

0

I’m making a BI panel, and in it I’m searching all the NETWORKS and putting into a dropdown, until then all right

Follows code:

<div class="row wow fadeInRight">
                        <div class="col-sm-3 col-sm-offset-2">
                            <form action="#">
                                <div class="form-group">
                                    <label id="drops-labels"><b id="centraliza-txt">REDE</b></label>
                                        <span data-toggle="tooltip" data-placement="top" title="ESCOLHA A REDE">
                                            <?php
                                                echo "<select class='form-control input-sm' name='redes' id='rede'>";
                                                    echo "<option value='0'>--Selecione--</option>";
                                                while($dadosRedes = mysql_fetch_array($buscarDadosSuperv)) {
                                                    echo "<option value='".$dadosRedes['Rede']."'>".$dadosRedes['Rede']."</option>";
                                                    }
                                                echo "</select>";
                                            ?>
                                        </span>
                                </div>
                            </form>
                        </div>

However, I have another dropdown that I’m wanting to be filled from a select in my database, bringing all the SHOPS of this respective NETWORK.

<div class="col-sm-3">
                            <form action="#">
                                <div class="form-group" id="load_lojas">
                                    <label id="drops-labels"><b id="centraliza-txt">LOJA</b></label>
                                    <span data-toggle="tooltip" data-placement="top" title="ESCOLHA A LOJA">
                                        <select class="form-control input-sm" name="loja" id="loja">
                                            <option value="0">--Selecione--</option>
                                        </select>
                                </div>
                            </form>
                        </div>

I tried to do with Ajax and Jquery and nothing.

And after that, I want to fill the values found in a table making a select in my table, filtering by NETWORK and SHOP.

  • Afterward read this

  • Check this article http://stackoverflow.com/questions/6857287/how-to-make-a-cascading-drop-down-list-in-php-using-jquery there is the scheme.

  • Still can’t get @NIZZOLA, help?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.