Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double data id into button #1

Open
nolbyte opened this issue Dec 10, 2021 · 0 comments
Open

Double data id into button #1

nolbyte opened this issue Dec 10, 2021 · 0 comments

Comments

@nolbyte
Copy link

nolbyte commented Dec 10, 2021

Hi! I want to add more data id into button such as
<button data-id="user_id" data-loan="loan_id">
With this jquery code
`
$('.btnpopup').click(function() {
var userId = $(this).data('user_id');
var loanId = $(this).data('loan_id');
$.ajax({
url: 'post.php',
type: 'post',
data: {
userId: userId,
loanId: loanId
},
success: function(response) {
$('.modal-body').html(response);
$('#addkelas').modal('show');
if (!response) {
alert('kosong');
return;
}
}

                });
            });

`

No result after send to post.php. Any help would be appreciate. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant