반응형
new Ajax.Request(actionURL,{
method: 'post',
parameters : {companyName : $F('coporatedCompany')},
onLoading : function(){},
onSuccess : function(response){
var resultObj = eval('(' + response.responseText + ')');
var resultValue = resultObj.result;
if ( resultValue == "SUCCESS" ) {
var tbody = $('tb1').select('tbody')[0];
while(tbody.hasChildNodes()){
tbody.removeChild(tbody.lastChild);
}
var companyList = resultObj.companyList;
for(var i = 0 ; i < companyList.length ; i++){
};
}
},
onFailure : function(){alert('뿅');}
});
method: 'post',
parameters : {companyName : $F('coporatedCompany')},
onLoading : function(){},
onSuccess : function(response){
var resultObj = eval('(' + response.responseText + ')');
var resultValue = resultObj.result;
if ( resultValue == "SUCCESS" ) {
var tbody = $('tb1').select('tbody')[0];
while(tbody.hasChildNodes()){
tbody.removeChild(tbody.lastChild);
}
var companyList = resultObj.companyList;
for(var i = 0 ; i < companyList.length ; i++){
};
}
},
onFailure : function(){alert('뿅');}
});
actionURL 이곳에는, URL 경로를 적어 주면 되겠지,
반응형
'JavaScript > ajax' 카테고리의 다른 글
Ajax XMLHttpRequest caching 방지 (0) | 2011.11.23 |
---|---|
Ajax new XMLHttpRequest() (0) | 2011.03.04 |
Ext Tree Jsp (0) | 2010.10.11 |
Ajax - Ajax.Updater (0) | 2010.06.09 |