views:

271

answers:

0

Hi, i'm trying to build up an edit form with some . The first one use a dataUrl to load some Provinces; selecting a value another must be populatied with an ajax query filtered with a where clause. I have tried using this:

{dataUrl: 'query1.asp',dataEvents:[{type:'change', fn: function(e) {$("#select2").parent().load('query2.asp?variable='+$("#select1").val());}}]}

ONLY the first time I select a value from the select1 the select2 changes, after the first time, the ajax call is made and the page give me the right response (the complete new select construct with the right values) but the select2 doesnt change.

Is there somthing I'm missing?