Go to the source code of this file.
Functions | |
function | modify_document_success_box (req, json) |
receive answer from ajax and just display it into the IBox XML must contains at least 2 fields : code is the ID of the IBOX and html which is the contain | |
function | modifyModeleDocument (p_value, dossier) |
function modify_document_success_box | ( | req, | |
json | |||
) |
receive answer from ajax and just display it into the IBox XML must contains at least 2 fields : code is the ID of the IBOX and html which is the contain
Definition at line 56 of file modele_document.js.
References alert(), g(), getNodeText(), and unescape_xml().
Referenced by modifyModeleDocument().
{ try { var answer=req.responseXML; var a=answer.getElementsByTagName('ctl'); var html=answer.getElementsByTagName('code'); if ( a.length == 0 ) { var rec=req.responseText; alert ('erreur :'+rec); } var name_ctl=a[0].firstChild.nodeValue; var code_html=getNodeText(html[0]); code_html=unescape_xml(code_html); g(name_ctl).innerHTML=code_html; g(name_ctl).style.height='auto'; } catch (e) { alert("success_box"+e.message); } try { code_html.evalScripts(); } catch(e) { alert("answer_box Impossible executer script de la reponse\n"+e.message); } }
function modifyModeleDocument | ( | p_value, | |
dossier | |||
) |
p_value | jrn.jr_id |
Definition at line 22 of file modele_document.js.
References add_div(), error_box(), layer, loading(), modify_document_success_box(), offsetX, offsetY, posX, and style.
{ layer++; id='det'+layer; var pos_y=posY+offsetY-20; var pos_x=posX+offsetX+40; var style="position:absolute;top:"+pos_y+"px;left:"+pos_x+"px"; var popup={'id':'mod_doc', 'cssclass':'inner_box', 'html': loading(), 'drag':false, 'style':style }; querystring='gDossier='+dossier+'&op=mod_doc&id='+p_value+'&div=mod_doc'; if ( ! $('mod_doc')) { add_div(popup); } var action=new Ajax.Request( "ajax_misc.php", { method:'get', parameters:querystring, onFailure:error_box, onSuccess:modify_document_success_box } ); }