Elwood: Dynamisches Javascript nach Ajax Aufruf

Beitrag lesen

Meine Ajax-Funktion sieht nun so aus:

  
function fShowParm(pFNCT, pParm, pVersion, pSubMode, pCalMode, pRow, pCol){  
  var params = "IBIF_ex=EMII014&"+"FNCT="+pFNCT+"&"+"COLPARM="+pParm ;  
  var xhri = xhrRequest();  
  xhr[xhri].open(pSubMode,pCalMode,false);  
  xhr[xhri].onreadystatechange=function() {  
    if (xhr[xhri].readyState==4 && xhr[xhri].status == 200) {  
      var response = xhr[xhri].responseText;  
      var container = document.getElementById("parmView");  
      container.innerHTML = '';  
      dom = stringToDOM('<table class="parmView"><tbody><tr><td colspan="2" class="parmView">'+  
                    response +  
                    '</td></tr>'+  
                    '<tr><td>| '+  
                    '<a href="javascript:updateParm(\''+pFNCT+'\',\''+pParm+'\',\''+pVersion+'\',\''+pCalMode+'\',\''+pSubMode+'\');">Speichern</a>'+  
                    ' |</td><td>| '+  
                    '<a href="javascript:hideParmView();">Abbrechen</a>'+  
                    ' |</td></tr></tbody></table>');  
      var scripts = dom.getElementsByTagName("SCRIPT");  
      for(var j=0;j<scripts.length;j++){  
        eval(scripts[j].data);  
      }  
      container.appendChild(dom);  
      container.style.display = "block";  
      var tables = document.getElementsByTagName("TABLE");  
      for(var i=0;i<tables.length;i++){  
        if(tables[i].id == "dataTable"){  
          var table = tables[i+1];  
        }  
      }  
      var gPos = getPos(table.rows[pRow].cells[pCol-1]);  
      var gDim = getDim(table.rows[pRow].cells[pCol-1]);  
      document.getElementById("parmView").style.top = (gPos.y + gDim.h)+"px" ;  
      document.getElementById("parmView").style.left = gPos.x+"px";  
      xi[xhri]  = 1;  
      xhr[xhri] = null;  
    }  
  }  
  xhr[xhri].setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
  xhr[xhri].setRequestHeader("Content-length", params.length);  
  xhr[xhri].setRequestHeader("Connection", "close");  
  xhr[xhri].send(params);  
}  
  

Ich denke, so war Deine Antwort gedacht, oder?

Dies macht leider im Resultat keinen Unterschied. :o(