diff --git a/html/js/scripts.js b/html/js/scripts.js index 45a73e980..1bb1bd2c2 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -1707,6 +1707,15 @@ function view_action(ag_id,dossier,modify) onSuccess: function(req) { try { remove_waiting_box(); + var answer=req.responseXML; + var html=answer.getElementsByTagName('code'); + if ( html.length == 0 ) + { + var rec=req.responseText; + alert ('erreur :'+rec); + } + var code_html=getNodeText(html[0]); + code_html=unescape_xml(code_html); var pos = fixed_position(0, 50) + ";width:90%;left:5%;"; add_div({ id: id, @@ -1714,10 +1723,10 @@ function view_action(ag_id,dossier,modify) cssclass: "inner_box", style: pos }); - $(id).innerHTML = req.responseText; + $(id).innerHTML = code_html; compute_all_ledger(); } catch (e) { - alert(e.message); + alert('view_action'+e.message); } } } diff --git a/include/ajax_view_action.php b/include/ajax_view_action.php index 042048fe9..14c8c5d93 100644 --- a/include/ajax_view_action.php +++ b/include/ajax_view_action.php @@ -27,6 +27,7 @@ * */ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); +ob_start(); require_once 'class_follow_up.php'; echo HtmlInput::title_box(_("Détail action"), $div); $act = new Follow_Up($cn); @@ -52,5 +53,17 @@ else + + +$html + +EOF; +exit(); ?> \ No newline at end of file