Solved

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

Posted on 2007-12-03
4
165 Views
Last Modified: 2010-04-09
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
Comment
Question by:dgmcpher
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 500 total points
ID: 20399793
Not really...

The data is correctly encoded. Why would you need it do be encoded in any different way?
0
 
LVL 16

Expert Comment

by:rbudj
ID: 20400080
Just hard code the %20:

Search%20Scope
0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 20401353
> 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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now