kd21
20 Feb 2007, 1:09 AM
hi to all
i want to know how to update my BasicDialog after the ajax connection...
i m using BasicDialog
when i click the submit then one serverside page invoked and give some response...
every thing is fine ...
only issue is how to put that response in my basicDialog...or how to update...
am i right way or not plz help me
my code is.............
submitDialog : function() {
mail = getEl("forget_email").dom.value;
div = document.getElementById("forDiv");
postdata="forget_email="+mail+"&button=send_mail";
success: function(o) {
if(o.responseText !== undefined){
div.innerHTML = o.responseText;
}
};
failure: function(o) {
if(o.responseText !== undefined){
div.innerHTML = o.responseText;
}
};
var request=YAHOO.util.Connect.asyncRequest("POST", "AuthServlet", {success:this.success, failure:this.failure}, postdata);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new YAHOO.ext.BasicDialog("forget-dlg", {
//modal:true,
autoTabs:true,
width:400,
height:200,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Close', dialog.hide, dialog);
dialog.addButton('Submit', Layout.submitDialog, Layout);
}
dialog.show(dialogEl.dom);
}
};
}();
YAHOO.ext.EventManager.onDocumentReady(Layout.init, Layout, true);
i want to know how to update my BasicDialog after the ajax connection...
i m using BasicDialog
when i click the submit then one serverside page invoked and give some response...
every thing is fine ...
only issue is how to put that response in my basicDialog...or how to update...
am i right way or not plz help me
my code is.............
submitDialog : function() {
mail = getEl("forget_email").dom.value;
div = document.getElementById("forDiv");
postdata="forget_email="+mail+"&button=send_mail";
success: function(o) {
if(o.responseText !== undefined){
div.innerHTML = o.responseText;
}
};
failure: function(o) {
if(o.responseText !== undefined){
div.innerHTML = o.responseText;
}
};
var request=YAHOO.util.Connect.asyncRequest("POST", "AuthServlet", {success:this.success, failure:this.failure}, postdata);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new YAHOO.ext.BasicDialog("forget-dlg", {
//modal:true,
autoTabs:true,
width:400,
height:200,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Close', dialog.hide, dialog);
dialog.addButton('Submit', Layout.submitDialog, Layout);
}
dialog.show(dialogEl.dom);
}
};
}();
YAHOO.ext.EventManager.onDocumentReady(Layout.init, Layout, true);