How to call name space with id given on page load
i have following name space
var panel = panel || {};
panel = (function() {
var div_pass = function (id) {
id_given=id;
};
var type = function(type_pass) {
type_given=type_pass;
};
return {
divid : function() {
return type_given;
}
};
}());
i am calling this on page load as
onload="panel.div_pass('window')"
this do not calling div_pass i put alert but showing in div_pass
If you want to call
panel.div_passthen you need to return div_pass on panel.