Link to home
Start Free TrialLog in
Avatar of mock5c
mock5c

asked on

setting value in complex structure

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">
            <thead>
                <tr>
                    <th>Region</th>
                    <th>Building</th>
                    <th>Room</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <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>
                    </td>
                    <td>
                        <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>
                        </select>
                    </td>
                    <td>
                        <input class="vlistvalue" tabindex="47" label="Room" style="width:300px;" type="text">
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial