Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have 2 tables with id myTabledashboard1 and myTabledashboard2 in 1st table it has ID and USERNAME and in 2nd table there is a Img type Button on which it open a electron window in which I have used a input tag in which I want it load USERNAME in INPUT TAG


What I have tried:

// get the username from myTabledashboard1
var username = document.getElementById('myTabledashboard2').innerHTML;

// add a click event listener to the BTN1 button
document.getElementById('btn1').addEventListener('click', function() {
// get the input text field
var input = document.getElementById('username1');

// set the value of the input text field to the username
alert(username);
input.value = username;
Posted
Updated 3-Jan-23 0:23am
Comments
OriginalGriff 3-Jan-23 6:01am    
And?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
Mayank Prajapati 2023 3-Jan-23 6:26am    
dont look at the code just show me how to get table tr innertext in shown it in electron js
OriginalGriff 3-Jan-23 6:57am    
And?
What have you tried?
Where are you stuck?
What help do you need?

If the code isn't relevant, why do you post it?

Use the "Improve question" widget to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900