I have the declaration form sample where the name and designation value alone should be fetched from
MS SQL Database for each user.So this has to be dynamically fetched on click of the name in a row.
I need the full code step by step as am a beginer.Thank you in advance
Loading
Deepak RawatPosted May 11, 2023, 8:05 AM
Hi, you can try this but Please note that this code assumes you are using a server-side technology like Node.js and have set up a connection to your MS SQL Database.
Step 1: Set up the HTML structure: Create an HTML table with rows and columns to display the user information, and include a click event handler on the name column.
Step 2: Create the JavaScript code (script.js): In the script.js file, define the
fetchUserInfofunction that will handle the click event and fetch the name and designation values from the database.Step 3: Set up the server-side code (assuming Node.js and Express.js): Create a server-side route that handles the request to fetch user information from the MS SQL Database.
Make sure to install the necessary dependencies such as
expressandmssqlusing npm before running the server.