• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

Using Get method to submit a form... problems with spaces.

Hi Gang,
I am using the get method to submit a form.  There is one drop down box and one text box.

Problem: When I submit the form, the url variable from the drop down box has spaces replaced with the plus (+) sign.  I need the spaces to be replaced with %20 instead.  Is there any way to do this?

Here is a sample of the code:
    <form method="get" action="http://test/results.aspx">
      <font face="Verdana, Arial, Helvetica, sans-serif" point-size="10">

        <SELECT class="select2" NAME="s" SIZE="1">
           <option selected value="">Search Scope</option>  
           <option value=All Sites>All Sites</option>  
           <option value="Internet web sites">Internet web sites</option>  
           <option value="">Intranet web sites</option>  
        </select>                        

        <input class="textbox3" type="text" name="k" size="50" value="" align="top">

        <input type="submit" value="Search" alt="Search the Enterprise" hspace="2">
      </font>
    </form>
0
dgmcpher
Asked:
dgmcpher
  • 2
1 Solution
 
Göran AnderssonCommented:
Not really...

The data is correctly encoded. Why would you need it do be encoded in any different way?
0
 
rbudjCommented:
Just hard code the %20:

Search%20Scope
0
 
Göran AnderssonCommented:
> Just hard code the %20

Then it will be doubly encoded into "Search%2220Scope". When it's decoded you don't get "Search Scope", you get "Search%20Scope".
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now