View Full Version : Removing the '+' from passed data
10-12-2006, 03:43 PM
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.
10-12-2006, 04:52 PM
tmpStr = tmpStr.replace (/\+/g, " "); // replace + sign(s) by space(s)
10-12-2006, 05:48 PM
OK thanks, but does that need to sit inside a function as it dont work (sorry, still on the curve)
10-12-2006, 07:33 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.