I have went created by the PHP code takes DP data from HTML tables that dynamically. The last field in the table is an input field to enter a number. The data from the table must be sent to the second php page to insert the SQL. I am new to XML and Ajax PLS helps me with above javascript code.
& lt; Script & gt; $ (Document) Click .ready ( "enter") or (function (event) {event.preventDefault (); to var elementTable = document.getElementById ( "form_table"); var jObject = []; (var i = 0 ; I & lt; elementTable.rows.length; i ++) {jObject [i] = []; Jobakt [i] [0] = Elimenttibl. ROS [i]. Seals [1] Kjlr HTML; Jeobakt [I. ] [1] = elementTable.rows [i] .cells [2] .innerHTML; //} console.log (jObject) data input field, bridesmaid JSONObject = encodeURIComponent (JSON.stringify (jObject)) to obtain //; the error here var url = "submit.php"; var requestData = "& amp; dtable =" + JSONObject; var XMLHttpRequestObj = FileResort.Utils.createRequest (); XMLHttpRequestObj.open ( "POST", url, true); XMLHttpRequestObj .setRequest Header ("Content Type", "Application / X-www-Form-URL Exodited"); XMLHttpRequestObj.send (requestData);}); & Lt; / Script & gt;
As long as you're using JQuery, optimization
Which is mostly what you want for the table ordering ajax from zero ordering (which i Post think it should be, but that is my personal opinion)
No comments:
Post a Comment