You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have problem mapping data retrieves from remote host.
My JavaScript/jQuery code:
new TomSelect('#med',{ placeholder: 'Select Item', valueField: 'nationalNumber"', labelField: 'fullName', searchField: 'fullName', onChange: function(value) { }, sortField: { field: 'fullName', direction: 'asc' }, // fetch remote data load: function(query, callback) { $.ajax({ type: "POST", cache: true, dataType: 'json', url: "ihioservices.php", //retrieves data from remote server via curl data: { searchTerm: query, ClinicID: "Test Clinic", cpartySessionId: "hg45212ddddd", serviceTypeId: "5" }, success: function(res) { callback(res.info); $("#medbox").html(res); //DEBUG }, error: function(res) { callback(); } }); }, });
The above code returns the following json from the remote host via curl and print it inside "medbox" DIV.
{ "resCode": 1, "resMessage": "operation is completed.", "info": [{ "fullName": "Test Item One", "shortName": "Test 1", "nationalNumber": "500170", "interfaceName": "Test Item One", "description": " ", "NORepeat": 0, "state": { "isCovered": true, "isSpecialDisease": false } },{ "fullName": "Test Item Two", "shortName": "Test 2", "nationalNumber": "500171", "interfaceName": "Test Item Two", "description": " ", "NORepeat": 0, "state": { "isCovered": true, "isSpecialDisease": false } }] }
I see the above json data on the debugging DIV element (medbox).
However I can't see and select Items.
What's the problem?
anybody can help me in this case?
Thanks
Mansour
Beta Was this translation helpful? Give feedback.
All reactions