www.webdeveloper.com
Results 1 to 4 of 4

Thread: Problem in submitting parameters characters which contains +,%

  1. #1
    Join Date
    Mar 2006
    Posts
    57

    Problem in submitting parameters characters which contains +,%

    I have a textarea in form .I submit the form using Ajax.Everything works fine but problem is when textarea contains + ,% then data is not submitted properly .other problem is that when i type 4 lines in textarea then in server side i lost all the linebreak .How to preserve the line break when submitting data.
    Thanks

  2. #2
    Join Date
    Sep 2006
    Location
    Bucharest, RO
    Posts
    940
    Don't know about line breaks, but for the special characters you can use
    Code:
    encodeURIComponent(string);

  3. #3
    Join Date
    Mar 2006
    Posts
    57
    Quote Originally Posted by Znupi
    Don't know about line breaks, but for the special characters you can use
    Code:
    encodeURIComponent(string);
    I use encodeURIComponent(string); but i not receive any parameter in server
    When i use encodeURI(string) i receive data properly when it contains % .But when i use + in my parameter then i not get + signin server .
    Thanks

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,414
    So the next question is... Code.

    What code are you using to submit the data? You may well be rendering the request wrong or it may be incomplete...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles