TadeUSH Posted January 16, 2008 Report Share Posted January 16, 2008 Izmantoju zemāk norādīto ajax js kodu ... lapa izmanto ISO-8859-1 charsetu ... nomainiju hedera sūtīšanā , bet tas vēl nav vienīgais kas man neatgriež Ž,Š uz pašas lapas ... Nedosmojaties ... Search izmantoju sīki un plaši neatradu problēmas atrisinājumu jau esošās diskusijās ... ja kāds var palīdzēt būšu tikai pateicīgs ... function creaAjax(){ var objetoAjax=false; try { objetoAjax = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { objetoAjax = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { objetoAjax = false; } } if (!objetoAjax && typeof XMLHttpRequest!='undefined') { objetoAjax = new XMLHttpRequest(); } return objetoAjax; } function FAjax (url,capa,valores,metodo) { var ajax=creaAjax(); var capaContenedora = document.getElementById(capa); if(metodo.toUpperCase()=='POST'){ document.write="hola pepe"; ajax.open ('POST', url, true); ajax.onreadystatechange = function() { if (ajax.readyState==1) { capaContenedora.innerHTML="<img src=http://***.lv/images/loading2.gif>"; } else if (ajax.readyState==4){ if(ajax.status==200) { document.getElementById(capa).innerHTML=ajax.responseText; } else if(ajax.status==404) { capaContenedora.innerHTML = "Error404 sazinies ar tadeush@***.lv"; } else { capaContenedora.innerHTML = "Error: ".ajax.status; } } } ajax.setRequestHeader('Content-Type','text/xml; charset=UTF-8'); ajax.send(valores); return; } if (metodo.toUpperCase()=='GET'){ ajax.open ('GET', url, true); ajax.onreadystatechange = function() { if (ajax.readyState==1) { capaContenedora.innerHTML="<img src=http://***.lv/images/loading2.gif>"; } else if (ajax.readyState==4){ if(ajax.status==200){ document.getElementById(capa).innerHTML=ajax.responseText; } else if(ajax.status==404) { capaContenedora.innerHTML = "Error404 sazinies ar tadeush@***.lv"; } else { capaContenedora.innerHTML = "Error: ".ajax.status; } } } ajax.setRequestHeader('Content-Type','text/xml; charset=UTF-8'); ajax.send(null); return } } Link to comment Share on other sites More sharing options...
andrisp Posted January 16, 2008 Report Share Posted January 16, 2008 Apraksti saprotamāk problēmu. Bet vispār: http://en.wikipedia.org/wiki/ISO_8859-1 missing Š, š, Ž, ž for loan words Link to comment Share on other sites More sharing options...
v3rb0 Posted January 16, 2008 Report Share Posted January 16, 2008 imho ajax nenobedz tos burtus, kādus serveris deva, tādus ar rāda. Link to comment Share on other sites More sharing options...
Recommended Posts