Skip to content
Advertisement

Modal inside my html table not working or can’t be open, only the first is modal is working

Only first modal can be open inside my html table is there a way to fix it? I’m using javascript to open modal instead of using target using a button. I want to open modal for every selected row in my table. Thank you in advanced.

Modal

This is my html table code

JavaScript

Then this is my modal code

JavaScript

and this is my script

JavaScript

Advertisement

Answer

Inside table

JavaScript

make sure inside getData() we have correct data in proper format int or string.

Keep the modal as its or you may change if required.

In the script

JavaScript

to debug check error message and post that too so it will be easy to solve your problem.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement