Skip to content
Advertisement

how to get values from different classes on click with jquery

how to get values from different classes with jquery. I made on click to edit and delete, I want to get the idUser value and username and be accommodated using jquery then it can be passed on to the controller, but the values cannot be retrieved and onclick cannot run like a redirect to the next page for editing and there is no action to delete . how can I get values from different classes and onclick can work? I beg for your help, if there is something lacking, apologize and if there is something unclear, you can ask me …

note: I use php native MVC

This is my code for view table user_management.php

JavaScript

This is my controller usermanagement.php function edit

JavaScript

This is My code from controller usermanagement.php delete function

JavaScript

This is my controller usermanagement.php function getUserbyId

JavaScript

This is my page edit_user.php

JavaScript

This is my code edit.php

JavaScript

This is my problem: I have get a data idUser enter image description here

but when I click ok, I want to redirect page edit_user.php but show this enter image description here

I want if I click edit show this page enter image description here

Advertisement

Answer

There was an error on your code, I have fixed that now. Please see the below code. I have added console.log to debugging the value and it does work for me. Please check and let me know If you face any difficulties

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