Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8701991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:32:20+00:00 2026-06-13T02:32:20+00:00

I have HTML5 code: Select item: And code behind: function fillItemsList(jsonResponse){ var data =

  • 0

I have HTML5 code:

Select item:

And code behind:

function fillItemsList(jsonResponse){
    var data = jsonResponse.invocationResult;
    var itemsString  = data.commodities.toString();
    itemsList = itemsString.split(",");
    $('#selectItem').empty();
    var options = "";
    for (var i = 0; i < itemsList.length; i++) {
        WL.Logger.debug(itemsList[i]);
         options += '<option value= "' + itemsList[i] + '">' + itemsList[i] + '</option>';

    }
    $('#selectItem').html(options);
    busyIndicator.hide();
    //$('#selectItem').Attributes.Add("onChange", "return itemSelectionChange();");
}
function itemSelectionChange(){
    WL.Logger.debug("Selected item changed");
    var index = $('#itemsList').prop("selectedIndex");
    var selectedItem = itemsList[index];
    getDeals(selectedItem);

}

I am using IBM Worklight to create a web app and using this code. The select dropdown gets all the values but the function doesnt get invoked when the selection is changed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:32:22+00:00Added an answer on June 13, 2026 at 2:32 am

    depends on what version of jQuery you are using, but the line:

    //$('#selectItem').Attributes.Add("onChange", "return itemSelectionChange();")
    

    should be something like:

    $('#selectItem').bind('change', function(){return itemSelectionChange();});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following line of code. <%= Html.Encode(string.Join(, , item.company1.companies.Select(x => x.company_name).ToArray())) %>
I have some html5 postMessage code: window.addEventListener(message, FA.recieveMessage, false); That listener invokes this function:
I have the following in my HTML5 code which makes use of javascript: var
I have this code: function loadRegions() { var xmlhttp; if (window.XMLHttpRequest) {// code for
I have this HTML code which simulates a dropdown multi-checkbox <div> <div class=select> <span>Select
Below are the options that I have in my HTML code: <label id="subn"> <select
Let's say I have the following in my HTML code: <select name=Currency id=Currency> <option
I have the following code in html: <select> <option text=item9 value=9></option> <option text=item10 value=10></option>
I have some html5 canvas code to make an image, the current fillstyle is
Hello every one I have wrote a simple code in html5 in which I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.