Skip to content
Advertisement

why my variable does not pass in the modal box

good evening I have two sites the first in php and the second in wordpress

on the one in php i have a table with links

each link opens an article to wordpress

the link is in $donnees[“guid”]

I did some var_dump of $donnees[“guid”]

the results are correct

Except when the modal opens

It’s always the same value

JavaScript
JavaScript

Advertisement

Answer

Make the different ids for different modals or make the template

When you have a few tags with id=”myModal” it will open the first modal every time

html:

JavaScript

js:

JavaScript

for next button it will be myModal2, myModal3 and etc.

Upd, for last changes:

html:

JavaScript

js:

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