Hi Team
I have search tab, works fine but now i want to figure out once that data gets retrieved from the active directory. It must displayed to the table body(DisplayName, EmailAddress, Department columns here).
// ajax call
Select People and Groups
Details
Display Name
E-mail Address
Title
Department
Presence
Work Phone
Location
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Mar 1, 2024, 11:08 AM
Add the id="userTable" attribute to your
Mithilesh TataPosted Mar 1, 2024, 10:49 AM
To pass data to a table using AJAX (Asynchronous JavaScript and XML), you typically fetch the data from a server-side endpoint (e.g., an API) and then dynamically populate the table with the retrieved data. Here's a basic example of how you can achieve this using jQuery and AJAX:
HTML:
In this example:
'your-api-endpoint-url'with the URL of your server-side endpoint that returns the data in JSON format.$.ajax()function from jQuery. It's a GET request expecting JSON data.successcallback function populates the table dynamically by iterating over the data array and appending rows to the table body ().- If an error occurs during the AJAX request, the
errorcallback function logs the error to the console.Ensure that your server-side endpoint returns the data in the expected JSON format. Adjust the table structure and data population logic according to your specific requirements and the structure of your data.