/    Sign up×
Community /Pin to ProfileBookmark

Issue with Listbox data refresh

Hi,
Need some help with following JAVA Script
I am facing issue with Listbox refresh.

<script type=”text/ng-template” id=”editEMPID.html”>
<div style=”padding: 10px;”>
<div style=”display: inline-block; width: 99%;padding: 5px 0px;text-align: right;”>
<input type=”button” name=”X” class=”close” ng-click=”cancel()”>
</div>
<p class=”msg error” ng-show=”errorsOccur”>
{{ errorMessages }}
</p>
<h1 class=”popupAddHeading”>Change EMPID</h1>
<table border=”0″ cellspacing=”0″ cellpadding=”0″ class=”popup-table”>
<tbody>
<tr>
<td>EMP ID : </td>
<td align=”left”>
<select class=”selectBox” style=”width: 250px;” ng-change=”empidChanged()”
ng-model=”model.selectedEmpid”
ng-options=”empid.empid for empid in empids”></select>
</td>
</tr>
<tr>
<td>Name : </td>
<td align=”left”>
<select class=”selectBox” style=”width: 250px;” ng-change=”NameChanged()”
ng-model=”model.selectedName”
ng-options=”name.name group by names.name for name in names”></select>
</td>
</tr>
<tr>
<td>Company : </td>
<td align=”left”>
<select class=”selectBox” style=”width: 250px;” ng-change=”companyChanged()”
ng-model=”model.selectedCompany”
ng-options=”company.COMPANY for company in companies”></select>
</td>
</tr>
<tr>
<td colspan=”2″ align=”center” valign=”top”>
<input type=”button” value=”Save” class=”buttonClass” ng-click=”save()” />
</td>
</tr>
</tbody>
</table>
</div>
</script>

  • Application is running in IE8

  • 2nd listbox (NAME) is not getting refreshed properly – it retains the value from prior selection.
  • to post a comment
    JavaScript

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @toicontienDec 11.2013 — After refreshing the ListBox, you'll probably need to set the selectedIndex property of the list box to zero.
    ×

    Success!

    Help @MasterMMR spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...