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 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy post array in URL

    hello i need to send a set of names to a webservice in order to use this information there, the problem is i may have more of 400 names to send to this webservice and i can not send so much information in the URL because of the URL string size.
    the thing is, i thought i can send this set of names using an array and post this array in the URL string but i found i can not serialize an array in javascript, is this true or any other suggestion to this problem?? the goal of this is get the set of names to go to the webservice. any help would be appreciate.

    thank's in advance

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Have you looked into using the xmlhttprequest object and using POST instead of GET? You won't run into the size limitation that way.
    As to serializing arrays, you could roll your own. But I think you're better off just sending the data as POST.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank's for the advice, but one more question,
    can i send the string array using this object or i have to format a string with the names i need to send??

    any help would be apreciate, thank's in advance

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You'd have to put the values into a string.
    Not a big deal, though. Simple loop.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    New Coder
    Join Date
    Jul 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    thank you nikki after all the test i did the only solution that works is xmlhttprequest your help was very valuable.

  • #6
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I am facing the same problem, can u plesae help me how to use xmlhttprequest to send array in URL.I am using C#.

    Thanks in advance its very urgent.

    Ekta


  •  

    Posting Permissions

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