Sign in to follow this  
Followers 0
smcneese

Setting DropDown List Value

2 posts in this topic

#1 ·  Posted (edited)

Can someone see what is wrong with this code.

$o_form = _IEFormGetObjByName ($oIE, "myForm")
$o_state = _IEFormElementGetObjByName ($o_form, "fvState")
_IEFormElementOptionselect($o_state, "TX", 1, "byValue")

<label for="fvState"><span>State</span></label>
                                    <div class="text-box sm clrfix">
                                        <select id="fvState" name="fvState" tabindex="7">
                                            <option class="select-title" value="">Select</option>
                                            <option value="AA">AA</option><option value="AE">AE</option><option value="AK">AK</option>
                                            <option value="AL">AL</option><option value="AP">AP</option><option value="AS">AS</option>
                                            <option value="AR">AR</option><option value="AZ">AZ</option><option value="CA">CA</option>
                                            <option value="CO">CO</option><option value="CT">CT</option><option value="DC">DC</option>
                                            <option value="DE">DE</option><option value="FL">FL</option><option value="FM">FM</option>
                                            <option value="GA">GA</option><option value="GU">GU</option><option value="HI">HI</option>
                                            <option value="IA">IA</option><option value="ID">ID</option><option value="IL">IL</option>
                                            <option value="IN">IN</option><option value="KS">KS</option><option value="KY">KY</option>
                                            <option value="LA">LA</option><option value="MA">MA</option><option value="MD">MD</option>
                                            <option value="ME">ME</option><option value="MH">MH</option><option value="MI">MI</option>
                                            <option value="MN">MN</option><option value="MO">MO</option><option value="MP">MP</option>
                                            <option value="MS">MS</option><option value="MT">MT</option><option value="NC">NC</option>
                                            <option value="ND">ND</option><option value="NE">NE</option><option value="NH">NH</option>
                                            <option value="NJ">NJ</option><option value="NM">NM</option><option value="NV">NV</option>
                                            <option value="NY">NY</option><option value="OH">OH</option><option value="OK">OK</option>
                                            <option value="OR">OR</option><option value="PA">PA</option><option value="PR">PR</option>
                                            <option value="PW">PW</option><option value="RI">RI</option><option value="SC">SC</option>
                                            <option value="SD">SD</option><option value="TN">TN</option><option value="TX">TX</option>
                                            <option value="UT">UT</option><option value="VA">VA</option><option value="VI">VI</option>
                                            <option value="VT">VT</option><option value="WA">WA</option><option value="WI">WI</option>
                                            <option value="WV">WV</option><option value="WY">WY</option>
                                        </select>
                                    </div>
Edited by smcneese

Share this post


Link to post
Share on other sites



Could you maybe be a bit more descriptive? Like, why do you think something is wrong with it? Do you get an error message and if you do, which one? Plus, it's always useful to specify what you are trying to do.. This way, it's much easier to help you;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0