TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Schleid Alex
NA
361
48.2k
Help me find jquery error
Apr 26 2020 2:45 PM
Hi,
I have this script.
<script>
$(document).ready(function() {
$('#ddlMonth').change(function () {
var ddlMonthValue = $('#ddlMonth').val()
})
$('#ddlYears').change(function () {
var ddlYearValue = $('#ddlYears').val()
//alert('The year selected is ' + ddlYearValue)
})
$('#btnShowTrans').click(function () {
alert('You made it here')
$.ajax({
type: 'GET',
url: '@Url.Action("GetAccountDetailByCustomerID", "AccountTransactions")',
contentType: 'apllication/html; charset=utf-8',
data: {
'id ': @Model.CustomerID,
'SelectedYear ': ddlYearValue,
'SelectedMonth': ddlMonthValue
},
dataType: 'html',
success: function (result) {
$('#dvAccountTransactions').html(result)
}
})
})
})
</script>
for some reason it keep saying ddlYearValue is not defined.
While I do have it defined, I think it is a problem with how I pass the different parameters.
thank you!
Reply
Answers (
4
)
Jquery script not working in partial view
toggle button not working in asp net core (Mobile View )