E
E
Evgeny Kolman2018-07-02 01:40:05
Java
Evgeny Kolman, 2018-07-02 01:40:05

Can't pass values ​​to modal window using JSTL?

Hello.
There was a question. I am writing applications in Java, I want to pass values ​​to the modal window using JSTL, but when I try to exit a different table element, the modal window pops up for the first entry.
The html code:
5b3957997b468832248181.png
This is how the table itself looks like:
5b3957cf3eab1024549777.png
And here I get in the modal window when I click the edit link (3rd key) on any of the elements:
5b39582db3345455820360.png
Tell me how you can fix this moment. Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-07-02
@Evgeny_13

If you look at the resulting html code, you'll see that the loop created a bunch of div.modal-windows with the same id. But IDs must be unique, there can't be two elements with the same id on the page. Either generate different id's, or create one modal window outside the loop, and fill the form fields in it when opened with javascript.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question