Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: AJAX concerns

  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AJAX concerns

    Alright I am having a few problems with AJAX.

    First of I can get and post information except for when I post I am noticing that it is replacing all the + signs without me using replace at all. All I am doing is escaping the content as it must be escaped to be sent.

    Second of all is there anyway to keep content escaped when sending it through AJAX and not having be unescaped when the data is posted?

    Thanks for your help.

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    XMLHttpRequest.send("name=" + encodeURIComponent(value));

    You must encode your data to send it across as a post. Are you doing this?

    If so, could you post the value you're sending, the value you're expecting, and the value you're getting?

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am doing:

    XMLHttpRequest.send("name="+escape(value));

    To my knowledge so far there isn't a difference between escape() and encodeURIComponent(). Tell me if I am mistaken.

  • #4
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •