Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"&" getting converted into %26 in query string

Status
Not open for further replies.

SatishPutcha

Programmer
Joined
Mar 12, 2002
Messages
256
Location
IN
Hello Everybody

I am trying to create a querystring in Javascript that I append to my form action.

I want it like
Code:
searchterm=abel&Submit=Go&searchtype=property&extra=quickSearch
But why is it showing like this in the address bar
Code:
searchterm%3Dabel%26Submit%3DGo%26searchtype%3Dproperty&extra=quickSearch

My javascript for the form submit is:
Code:
valquerystring = "searchterm%3Dabel%26Submit%3DGo%26searchtype%3Dproperty&extra=quickSearch";

frmbookmark.action = "search.php?" + valquerystring;

Thanks and Regards
Satish Kumar
 
Sorry the valquerystring value is being formatted properly with "&" and "=" but it is showing differently in the address bar.

Any ideas please!!

Thanks and Regards
Satish Kumar
 
Dan

Thanks for the help. I will try it.

One thing though. When I am doing an "alert" of the valquerystring it is showing well-formatted.

Thanks and Regards
Satish Kumar
 
No problem. All help is welcome.

Anyway, I could not do it with the form submit but I tried document.location.href and the querystring remained formatted. It worked!!

Though still not sure what happened when using form submit.

Thanks for your help.

Regards
Satish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top