> $("#add_linha").emtpy().append(data); it should be empty() not emtpy() ...
On 14 Dez., 13:36, Marcelo Wolfgang <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm banging my head on the keyboard here ... and couldn't figure out > why this isn't working I have the following code: > > HTML: > <div id="add_formColeção" class="overflow"> > <label for="add_colecao">Coleção:</label> > <select name="add_colecao" id="select_colecao"> > <option value="">Escolha uma coleção</option> > <option value="1">Primavera Verão 2008</option> > <option value="2">Primavera Verão 2008</option> > </select> > </div> > <div id="add_formLinha" class="overflow"> > <label for="add_linha">Linha:</label> > <select name="add_linha" id="add_linha"> > <option value="">escolha uma coleção</option> > </select> > </div> > > JS: > $("#select_colecao").change(function(){ > var colecaoId = this.value; > $.get("act/act_linhas_na_colecao.php", {colId:colecaoId}, > function(data){ > alert($("#add_linha").html())// outputs <option > value="">escolha uma > coleção</option> > alert(data)// outputs <option value="78900">78900 - > Flex</option> > <option value="80900">80900 - Multi</option> > $("#add_linha").emtpy().append(data); // nothing happens > }); > > }); > > Can anyone shed some light why it doesn't works ? > > TIA