It is my Computer Notes. Using Guide : object-key or object-key-key e.g. Step 1 Blog Search : [mysql-run] and then Step 2 ctrl+F [mysql-run] {bookMark me : Ctrl+D}
2013年12月15日 星期日
jquery-getJson, when 2 getJson at the same time $.ajaxSetup({ async: false });
$.ajaxSetup({
async: false
});
var obj_field=document.getElementById('CUSTOMER.PAYMENT_TERMS_CODE');
obj_field.options[0] = new Option('','');
s='tableRead?table=PAYMENT_TERMS&fields=CODE,DESCRIPTION&where=where status:`A` or status:`D` &format=S,S&callback=?&db=BR201312111529'
$.getJSON(s,
function(data) {
if (data[0]){
for (r=0 ; r<data.length; r++)
{
$(obj_field).append($('<option></option>').val(data[r][0]).html(data[r][1]));
}
}
}
)
var obj_field=document.getElementById('CUSTOMER.PAYMENT_METHOD_CODE');
obj_field.options[0] = new Option('','');
s='tableRead?table=PAYMENT_METHOD&fields=CODE,DESCRIPTION&where=where status:`A` or status:`D` &format=S,S&callback=?&db=BR201312111529'
$.getJSON(s,
function(data) {
if (data[0]){
for (r=0 ; r<data.length; r++)
{
//combo.jsoncall20131213
//obj_field.options[r+1] = new Option(data[r][0],data[r][1]);
$(obj_field).append($('<option></option>').val(data[r][0]).html(data[r][1]));
}
}
}
)
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言