Link to home
Create AccountLog in
Avatar of LeighWardle
LeighWardleFlag for Australia

asked on

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

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
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

what do u mean set ddlMethod to ProcessPayment?
currently, the drop down list displays ProcessPayment cause its the first in the list.
Avatar of LeighWardle

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
so use label instead:
<label for="ddlMethod">Method Type: ProcessPayment</label>

Open in new window