AnsweredAssumed Answered

How to pass search query into ArcGIS Online url?

Question asked by jason272002 on Apr 20, 2016
Latest reply on Apr 21, 2016 by rscheitlin

Hello I am attempting to add a form to an existing html that allows the user to type in a search term and query and existing ArcGIS Online map. For example, a person would enter a coordinate into the form such as:


The resulting url should be (unencoded) : 33.3456

encoded it should look like:


The problem is that because the parameter (find) is after the "?" the whitespace in the url is encoded with a "+" instead of "%20". The url becomes:

This causes  the feature search to search for : searchCapture.PNGwhich results in not finding the coordinate.


My question is how can I get a url form to pass the search query either unencoded, or having the whitespace encoded as "%20" instead of "+"? I am using the get method and have tried having a javascript function replace the whitespace with "%20", but the % symbol gets encoded. Any suggestions would be greatly appreciated!