View Full Version : loadscripts for tabpanelitem setcontent
jbowman
11-09-2006, 10:57 PM
could a loadscript optional tag be added to the setcontent method of tabpanelitem?
jack.slocum
11-10-2006, 06:14 AM
setContent is a straight HTML string plug - you have scripts in your HTML string? :shock:
jack.slocum
11-10-2006, 06:15 AM
Haha, I just went to add it for you and it's already there. :D
jbowman
11-10-2006, 11:37 AM
Maybe I'm just going about it the wrong way and can use getEl().update... I'm using basicdialog to do a login form. If the login is successful it would return some javascript that would rebuild sections o the page for a logged in user, and if the login failed (bad username/password combo) it just redisplays the form with an error message included.
however you said it's already there.. is that in a currently downloadable version, or what's running live on your site.. .or?
login : function() {
submitButton.disable();
YAHOO.util.Connect.setForm(document.getElementById('logiForm'));
var loginSuccess = function(o) {
loginForm.setContent(o.responseText);
if ( document.getElementById('logiForm') )
{
YAHOO.util.Connect.setForm(document.getElementById('logiForm'));
submitButton.enable();
}
};
var loginFailure = function(o) {
getEl('dlgbd').update('Error submitting data to server, please try again later');
};
YAHOO.util.Connect.asyncRequest('POST', '/ci/user/login',
{success: loginSuccess, failure: loginFailure});
}
{success: registerSuccess, failure: registerFailure});
jack.slocum
11-10-2006, 11:41 AM
It's been there since beta 1. Second param, true. You have to tell it to look for scripts, it doesn't do it by default.
loginForm.setContent(o.responseText, true);
jbowman
11-10-2006, 01:00 PM
hey jack, it wasn't in there :?:
It was simple to add it though...
original from RC1
setContent : function(content){
this.bodyEl.update(content);
},
modification
setContent : function(content, loadScripts){
this.bodyEl.update(content, loadScripts);
},
jack.slocum
11-10-2006, 01:26 PM
I'm an idiot. I looked at the ContentPanel. Sure I will add it. :D
jbowman
11-10-2006, 04:10 PM
thanks Jack :)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.