We help IT Professionals succeed at work.
Get Started

setting value in complex structure

mock5c asked
Last Modified: 2014-05-26
I've encountered  a structure such as the one in the code snippet I'm pasting.  How can I set the values within any of the dropdowns (region, building, or room).  For example, I would like to set Building C as the selected item or set room to 444.

I would like to accomplish this using jquery.

<div class="row">
    <div class="grid1">&nbsp;</div>
    <div class="grid10">
        <input style="height: 1px; width: 1px; border: medium none; padding: 0px; margin: 0px; visibility: hidden;" tabindex="-1" value="1|Building B|222" title="Region, Building, Room" id="room" class="manadd" type="hidden">
        <table id="roomvaluelist" class="picktable valuelist">
                        <select tabindex="45" class="s_large vlistvalue" label="Region" nodbform="true" style="width:200px;">
                            <option value="">Select...</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                        <select tabindex="46" class="s_small vlistvalue" label="Building" style="width:200px;">
                            <option value="">Select...</option>
                            <option value="Building A">Building A</option>
                            <option value="Building B">Building B</option>
                            <option value="Building C">Building C</option>
                        <input class="vlistvalue" tabindex="47" label="Room" style="width:300px;" type="text">

Open in new window

Watch Question
Most Valuable Expert 2017
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE