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. Web Development
  3. call to web server through ajax

call to web server through ajax

Scheduled Pinned Locked Moved Web Development
helpsysadminquestion
4 Posts 3 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.
  • R Offline
    R Offline
    Rajkamal_dfine
    wrote on last edited by
    #1

    Hi all before sending request to web server using ajax i am creating a string with form element's name and corresponding value.the constructed string will looks like source.asp?elementName1=elementValue1&elementName2=elementValue2&elementName3=elementValue3 the problem with the above format is: if the elementValue itself contains any "&" symbol i can't able to get the value of the form element from server side. is there any way to resolve this issue other than replace the "&" char with some other char ..

    N.Rajakumar B.E., Application Developer, www.newdreamz.tk

    B 1 Reply Last reply
    0
    • R Rajkamal_dfine

      Hi all before sending request to web server using ajax i am creating a string with form element's name and corresponding value.the constructed string will looks like source.asp?elementName1=elementValue1&elementName2=elementValue2&elementName3=elementValue3 the problem with the above format is: if the elementValue itself contains any "&" symbol i can't able to get the value of the form element from server side. is there any way to resolve this issue other than replace the "&" char with some other char ..

      N.Rajakumar B.E., Application Developer, www.newdreamz.tk

      B Offline
      B Offline
      Bradml
      wrote on last edited by
      #2

      var location = " source.asp?elementName1=" + encodeURI(elementValue1) + "&elementName2=" + encodeURI(elementValue2) + "&elementName3=" + encodeURI(elementValue3);


      Brad Australian "Keyboard? Ha! I throw magnets over the RAM chips!" - peterchen

      J 1 Reply Last reply
      0
      • B Bradml

        var location = " source.asp?elementName1=" + encodeURI(elementValue1) + "&elementName2=" + encodeURI(elementValue2) + "&elementName3=" + encodeURI(elementValue3);


        Brad Australian "Keyboard? Ha! I throw magnets over the RAM chips!" - peterchen

        J Offline
        J Offline
        JimmyRopes
        wrote on last edited by
        #3

        Did you mean encodeURIComponent()?

        I'm on-line therefore I am. JimmyRopes

        R 1 Reply Last reply
        0
        • J JimmyRopes

          Did you mean encodeURIComponent()?

          I'm on-line therefore I am. JimmyRopes

          R Offline
          R Offline
          Rajkamal_dfine
          wrote on last edited by
          #4

          encodeURIComponent is working fine on all reserved chars where as encodeURI is limited...

          N.Rajakumar B.E., Application Developer, www.newdreamz.tk

          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