Start with ibox
This commit is contained in:
parent
7c12e5364a
commit
21f0d3d3f6
1 changed files with 30 additions and 1 deletions
|
|
@ -372,4 +372,33 @@ function success_set_tva_label(req) {
|
|||
function set_wait(name) {
|
||||
var content=name+"_content";
|
||||
$(content).innerHTML= '<image src="image/loading.gif" border="0" alt="Chargement...">';
|
||||
}
|
||||
}
|
||||
/**
|
||||
*@brief add dynamically a object for AJAX
|
||||
*@param obj.
|
||||
* the attributes are
|
||||
* - style to add style
|
||||
* - id to add an id
|
||||
* - class to add a class
|
||||
*/
|
||||
function add_div(obj) {
|
||||
try {
|
||||
var top=document;
|
||||
var elt=top.createElement('div');
|
||||
if (obj.id ) { elt.setAttribute('id',obj.id);}
|
||||
if (obj.style) {
|
||||
if (elt.style.setAttribute) { /* IE7 bug */
|
||||
elt.style.setAttribute('cssText',obj.style);
|
||||
} else { /* good Browser */
|
||||
elt.setAttribute('style',obj.style);
|
||||
}
|
||||
}
|
||||
if (obj.cssclass ) {
|
||||
elt.setAttribute('class',obj.cssclass);/* FF */
|
||||
elt.setAttribute('className',obj.cssclass); /* IE */
|
||||
}
|
||||
if (obj.html) { elt.innerHTML=obj.html;}
|
||||
var bottom_div=document.body;
|
||||
bottom_div.appendChild(elt);
|
||||
} catch (e) { alert(e.message);}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue