The deal here ... I need to make AJAX save scripts. I have a complete system that is created on php and needs to refresh every action ... I am trying to reduce the latest count using AJAX ... I can not find a way By sending a WYSIWYG editor output without loss in the PHP script ...
if (window.XMLHttpRequest) {xmlhttp = new XMLHttpRequest (); } And {xmlhttp = new ActiveXObject ('Microsoft.XMLHTTP'); } Function save () {xmlhttp.open ('POST', 'action.php', is true); Xmlhttp.setRequestHeader ("content-type", "app / x-www-form-urxed"); Xmlhttp.setRequestHeader ("content-length", document.getElementById ('output'). Value.length); Xmlhttp.setRequestHeader ("Connection", "Closed"); Xmlhttp.send (.ocument.getElementById ('product') value); Xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & amp; xmlhttp.status == 200} {$ ( '# ajaxresult'). Css ( 'ambiguity', 0.1); $ ( '# Ajaxresult' ) StopAll () stop (1000) .fadeTo (400,1) .. $ ('# Ajaxresult') StopAll (.) Break (3000) .Fediteo (400,0, function () {$ (this) .hide ();}); document.getElementById ('ajaxresult') innerHTML = xmlhttp.responseText.}}} Although this script works fine, I do not know what The type of array is being given the option to send ... what is syntax or something that I started in Don BTW JS I am trying to use jQuery and this is Ajax Library:
Instead of doing all that you do:
$ post ({url: 'action.php', data: output , Success: function () {/ * do something here *}});
Comments
Post a Comment