2
I even know the PHP and Javascript, the problem is that I do not know how to create the modal dynamically for each click on a link, bring specific information from that link. If you click on user 1, bring information in user’s modal window 1, if you click on user 2, show user information 2, and so on.
Here’s what I have so far, I’m not very experienced in Jquery, I believe that gives my greatest difficulty in solving this problem
$(document).ready(function()
{
//Show modal box
$('.showdialog').click(function(e) {
$('#dialog').show();
e.preventDefault();
})
//Hide modal box
$('.closeModal').click(function(){
$('.mask').hide();
});
});
<a href="?acao=editar&idusuario=1" class="showindow">Usuário 1</a>
<a href="?acao=editar&idusuario=2" class="showindow">Usuário 2</a>
Following is a list of links coming from the database, in the database results, no error, outside the window the results appear normally.
Don’t know PHP with DB, or can’t create modal? See an example of modal
– Papa Charlie
Duplicate
– Papa Charlie
I even know both, the problem is that I do not know how to create modal dynamically, every click on a link, bring specific information from that link, If you click user 1, bring information in user modal window 1, if you click on 2, show user information 2, and so on,!!!
– Wilerson Vaz
JS is very flexible and ends up having N answers with the same effect, so I recommend you show what you have done so we can help.
– Papa Charlie
Well, sorry if it doesn’t help. But here’s what I’d do: the information could come via ajax. I would pass as parameter the user id and return all data from it. By the time ajax returned this data I would create modal html and activate modal with js. If you think it helps, I’ll set an example code.
– Joao Paulo