Solved

Replace HTML Select / drop-down list by a single option only

Posted on 2013-05-19
4
501 Views
Last Modified: 2013-05-19
Hi Experts:

I have a HTML Select / drop-down list given by this code:

            <div class="fields">
                <label for="ddlMethod">Method Type</label>
                <select id="ddlMethod" name="ddlMethod" style="width:140px;">
                <option value="ProcessPayment">ProcessPayment</option>
                <option value="CreateTokenCustomer">CreateTokenCustomer</option>
                <option value="UpdateTokenCustomer">UpdateTokenCustomer</option>
                <option value="TokenPayment">TokenPayment</option>
                </select>
            </div>

Open in new window


I want to remove this code and replace it by the code that will set ddlMethod to ProcessPayment?

Regards,
Leigh
0
Comment
Question by:LeighWardle
  • 2
4 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 39180138
what do u mean set ddlMethod to ProcessPayment?
currently, the drop down list displays ProcessPayment cause its the first in the list.
0
 
LVL 1

Author Comment

by:LeighWardle
ID: 39180147
I don't want the user to see the drop-down at all - I just want the code to behave as though the user had selected ProcessPayment.
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39180152
Get rid of that whole section and use a hidden input.
<input type="hidden" id="ddlMethod" name="ddlMethod"  value="ProcessPayment">

Open in new window

0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39180155
so use label instead:
<label for="ddlMethod">Method Type: ProcessPayment</label>

Open in new window

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL inner join confusion 15 21
File not deleting using unlink 6 12
showing numeric numbers 2 10
Can't connect to my database 2 13
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

757 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

18 Experts available now in Live!

Get 1:1 Help Now