BasicDialog with one TabPanelItem a try to submit form
BasicDialog with one TabPanelItem a try to submit form
Hi Jack, great work...
I'm new to the yui and yui-ext extension.
and I have a questions ...
In BasicDialog with one TabPanelItem a try to submit a simple form..
The server response a simple text, with this text i want to replace the TabPanelItem
Thanks
....
my code:
String.prototype.htmlDecode = function(){
var ret;
var sReplace = /\+/gi;
ret= unescape(this);
ret = ret.replace(sReplace, " ");
return(ret);
}
var fncSubmitFrm = function() {
var fncSuccess = function(o){
[list:3610349b2e]var data = o.responseText.htmlDecode();
// UPDATE dialog-tabItemPanel // it works! but it is the way to do this?
var tabEls = YAHOO.util.Dom.getElementsByClassName('ydlg-tab', 'div', dialog.el.dom);
getEl(tabEls[0].id).update(data,true);
var Tab = dialog.getTabs().getTab(tabEls[0].id);
// get new content
tabEls = YAHOO.util.Dom.getElementsByClassName('ydlg-tab', 'div', dialog.el.dom); // why tabEls[1] ?????
Tab.setText(tabEls[1].title);
tabEls[1].title='';
Thanks Animal,
but the server responds with Response.Write (Server.URLEncode (shtml))
for that reason I had to implement the function
String.prototype.htmlDecode = function(){
var ret;
var sReplace = /\+/gi;
ret= unescape(this);
ret = ret.replace(sReplace, " ");
return(ret);
You can add your own extra params in the url parameter - which can be a function which returns a URL, so you can code this to know all about your object and set up appropriatye params.