Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Looking for a solution for combine WebService and jQuery (web app)

Looking for a solution for combine WebService and jQuery (web app)

Scheduled Pinned Locked Moved C#
javascripthtmlxml
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goldsoft
    wrote on last edited by
    #1

    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)
    
    Richard DeemingR 1 Reply Last reply
    0
    • G goldsoft

      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)
      
      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      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."

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups