Hey all I can not seem to get this to work in jQuery even though I know that it can:
my HTML code:
<div class="cd-panel from-right" id="va">
<header class="cd-panel-header" style="max-width: 600px;">
<h1 style="margin-top: 5px;" id="panHeading"></h1>
</header>
<div class="cd-panel-container" style="max-width: 600px; width: 600px;">
[more html code here...]
<div class="input-group">
<div class="input-group-addon">
<span class="glyphicon glyphicon-envelope"></span>
</div>
<div class="col-sm-10">
<input name="RequestID" disabled="True" class="form-control input-sm"
id="RequestID" style="width: 520px; max-width: 520px;" type="text">
</div>
</div>
[more html code here...]
</div>
<div class="cd-panel from-right" id="VDA">
<header class="cd-panel-header" style="max-width: 600px;">
<h1 style="margin-top: 5px;" id="panHeading"></h1>
</header>
<div class="cd-panel-container" style="max-width: 600px; width: 600px;">
[more html code here...]
<div class="input-group">
<div class="input-group-addon">
<span class="glyphicon glyphicon-envelope"></span>
</div>
<div class="col-sm-10">
<input name="RequestID" disabled="True" class="form-control input-sm"
id="RequestID" style="width: 520px; max-width: 520px;" type="text">
</div>
</div>
[more html code here...]
</div>
And this is my jQuery code:
if (responce["personData1"][0].RequestID != 1) {
$('#va > #RequestID').val(responce["personData1"][0].RequestID);
}
But it never puts the value inside that RequestID text box for VA even though it does have a value for RequestID. If I do this:
$('#RequestID').val(responce["personData1"][0].RequestID);
Then it has the value inside the text box.
What would I be missing?