Looking for a solution for combine WebService and jQuery (web app)
-
hi, i have this code for reading xml file into my list. var zfullname, zphone_M, zphone_F, zMail, zFname,zLname; var ALL; var Fname, Lname, Phone_M, Phone_F, Mail; function XX() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "Phone.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; $("#ZIZI").empty(); var x = xmlDoc.getElementsByTagName("MEN"); for (i = 0; i < x.length; i++) { try { Fname = x[i].getElementsByTagName("Fname")[0].childNodes[0].nodeValue; } catch (err) { Fname = "0"; } try { Lname = x[i].getElementsByTagName("Lname")[0].childNodes[0].nodeValue; } catch (err) { Lname = "0"; } try { Phone_M = x[i].getElementsByTagName("Phone_M")[0].childNodes[0].nodeValue; } catch (err) { Phone_M = "0"; } try { Phone_F = x[i].getElementsByTagName("Phone_F")[0].childNodes[0].nodeValue; } catch (err) { Phone_F = "0"; } try { Mail = x[i].getElementsByTagName("Mail")[0].childNodes[0].nodeValue; } catch (err) { Mail = "0"; } if (Mail == "0") Mail = " "; if (Phone_M == "0") Phone_M = " "; if (Phone_F == "0") Phone_F = " "; ALL = '* ' + '[' + '
' + ' **' + Fname + " " + Lname + '** ' + ' ' + Phone\_M + ' ' + ' ' + Phone\_F + ' ' + ' ](men.html)
-
hi, i have this code for reading xml file into my list. var zfullname, zphone_M, zphone_F, zMail, zFname,zLname; var ALL; var Fname, Lname, Phone_M, Phone_F, Mail; function XX() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "Phone.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; $("#ZIZI").empty(); var x = xmlDoc.getElementsByTagName("MEN"); for (i = 0; i < x.length; i++) { try { Fname = x[i].getElementsByTagName("Fname")[0].childNodes[0].nodeValue; } catch (err) { Fname = "0"; } try { Lname = x[i].getElementsByTagName("Lname")[0].childNodes[0].nodeValue; } catch (err) { Lname = "0"; } try { Phone_M = x[i].getElementsByTagName("Phone_M")[0].childNodes[0].nodeValue; } catch (err) { Phone_M = "0"; } try { Phone_F = x[i].getElementsByTagName("Phone_F")[0].childNodes[0].nodeValue; } catch (err) { Phone_F = "0"; } try { Mail = x[i].getElementsByTagName("Mail")[0].childNodes[0].nodeValue; } catch (err) { Mail = "0"; } if (Mail == "0") Mail = " "; if (Phone_M == "0") Phone_M = " "; if (Phone_F == "0") Phone_F = " "; ALL = '* ' + '[' + '
' + ' **' + Fname + " " + Lname + '** ' + ' ' + Phone\_M + ' ' + ' ' + Phone\_F + ' ' + ' ](men.html)
You have posted exactly the same question in the "Web Development" forum: http://www.codeproject.com/Messages/5152584/Looking-for-a-solution-for-combine-WebService-and.aspx[^] You also posted the same question twice last year, and received and accepted an answer: how to receive DataSet (xml) on jQuery[^] How to call webservice in HTML page using JQuery?[^] Also, your code is vulnerable to SQL Injection[^]. NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query. Everything you wanted to know about SQL injection (but were afraid to ask) | Troy Hunt[^] How can I explain SQL injection without technical jargon? | Information Security Stack Exchange[^] Query Parameterization Cheat Sheet | OWASP[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."