Solved

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

Posted on 2007-12-03
4
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

726 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