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
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Removing the '+' from passed data

    This has most likely been answered before so apologies but I couldnt find it, basically, I have a form that passes data to a second page where it calculates stuff, and part of the first form asks for 2 names, but when these appear on the 2nd page they have a + sign between the first and surname as obvioulsy this is how the URL passes the data over. How do I get around this other than splitting the First and Surname into separate fields. Thanks in advance.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,308
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    tmpStr = tmpStr.replace (/\+/g, " "); // replace + sign(s) by space(s)

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK thanks, but does that need to sit inside a function as it dont work (sorry, still on the curve)

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,308
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Yes, it must be within a function and of course within <Script> tags.

    You did not post any code so I am not able to be more specific.
    tmpStr is simply the name of the string containing the name data.


  •  

    Posting Permissions

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