You need to sign in to do that
Don't have an account?

Issue in google map the text in the search box is dilplayed with a + sign in between
This is the javascript function which prepares the search string.
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,\\\]);
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null ) return "";
else return results[1];
}
But once the text is searched then it is displayed with a plus sigm in between words.
For example
if i am searching for "CA Street California"
it gets replaced by "CA+Street+California"
Here all the spaces are automaticaly replaced by + sign so you have to use an inbuilt JavaScript Replace method to remove all the + signs before you return this from the JavaScript Function.
Hope this helps.
Hi pradeep,
Can you post a little demo code. As i tried doing that using str.replace("+"," ")
but it doesnot seem to work
here is updated script for you
Thanks,
Bala