472,967 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,967 software developers and data experts.

I need to make buttons work and dont know how

So i have this code here:
Expand|Select|Wrap|Line Numbers
  1.     let submitButton = document.querySelector("#btn");
  2.     let myAddList = document.querySelector("#addList");
  3.  
  4.     submitButton.addEventListener("click", submitFunction);
  5.      function submitFunction(){
  6.  
  7.         let getName = document.querySelector("#firstName").value;
  8.         let getLastName = document.querySelector("#lastName").value;
  9.         let getNumber1 = document.querySelector("#number1").value;
  10.         let getNumber2 = document.querySelector("#number2").value;
  11.         let getNumber3 = document.querySelector("#number3").value;
  12.         let getDate = document.querySelector("#date").value;
  13.         let getID = document.querySelector("#id").value;
  14.  
  15.  
  16.  
  17.             myAddList.innerHTML += "<li style='list-style:none'>Name: "+getName+"<br> "+ "Last name: " + getLastName +
  18.              "<br>" + "Phone number: " + getNumber1 + " " + getNumber2 + " " + getNumber3 + "<br>" + "Birth date: " + getDate + "<br>"
  19.              + "ID: " + getID + "<br>" + "<button id='accept'  >Accept</<button>" + 
  20.               "<button id='denied'>Denied</button>" + "</li>";
  21.  
  22.  
  23.  
  24.         document.querySelector("#form").reset();
  25.     }
which lets me add student info with one button. Now the thing is that every new student list has to have 2 buttons accept and denied which are only visible if i hover onto the particular list of students.How can i make that work?
Jun 4 '22 #1
1 9832
dev7060
626 Expert 512MB
Now the thing is that every new student list has to have 2 buttons accept and denied which are only visible if i hover onto the particular list of students.How can i make that work?
You may use hover pseudo-class and toggle the visibility using the display property.
Jun 12 '22 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Chris Krasnichuk | last post by:
Hello every one, Does anyone know how to make php work on your computer? please reply I need help Chris
20
by: Chris Krasnichuk | last post by:
hello, Does anyone know how I make php work on "my" computer? I made a mistake in my last post so I fixed it here. Chris
4
by: NH | last post by:
Hi, I just cannot get this to work. I want to make a cell editable in a datagrid only if the value of another cell is something specific. I am able to capture the value of the other cell via the...
2
by: hojjatnikan | last post by:
please help me this code 62EH&5gx0wiqoQFw is this name ( Belux) but i dont know how convert it i dont know the algorithm of this code plead help me
48
by: Nathan Sokalski | last post by:
Ever since I found out that they didn't give us a way to install both IE6 and IE7 on the same machine, I have been more frustrated and annoyed with Microsoft than I ever have been with any company...
7
by: Ron | last post by:
I have a couple of questions about this class.....: Public Class WordPair Private word1 As String Private word2 As String Public Sub New() word1 = "" word2 = "" End Sub Public Sub New(ByVal...
21
by: stephenrussett | last post by:
Ok i what i am trying to do is: I have a query that pumps out information like this: (1) (2) (3) (4) (5) 1 1 Cooper Street NS...
2
by: Tiruak | last post by:
Hi there. Thanks in advance for the people reading and trying to help. I'm very begginer using flash and action script, and I tryed to do this one navigation menu. Since I dont have experience...
2
by: Sreenivas | last post by:
I dont know how to compile cpp programs with gcc as i am new to gcc and cpp. could anybody help me out? Thanks&Regards, Srinivas Reddy Thatiparthy.
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.