Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
Denmark1
Denmark1's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
how to pass the value of frm and other parameter susing ajax and jquery?
[0Replies]
21-May-2020 05:38 AM
Forum:
Using jQuery Plugins
hi im stuck here for many days please help me. i need to pass the value of selected ids into ajax . but my parameter is null
but when i remove this part. the the ids has a value but my model parameter is null. i need to pass the value of both parameter
var fileInput = $('#files');
var filename = fileInput.files[0].name
formdata.append(filename, fileInput.files[0]);
this is my full code.
var table;
$(function () {
table = $('#Payable').DataTable({
"ajax": "@Url.Action("getpayablelist", "payment")",
"columns": [
{
"render": function (data, type, full, meta) {
return "<input type='checkbox' class='selected' onclick='add(" + full.Id + ", " + full.Amount + ", this.checked)'>"
}
},
{ "data": "Type" },
{ "data": "ReferenceNo" },
{ "data": "Amount" }
]
});
});
function edit(id) {
window.location.href = "@Url.Action("add", "order")?id=" + id;
}
var ids = [];
function add(id, isChecked) {
if (isChecked) {
ids.push(id);
}
else {
var i = ids.indexOf(id);
ids.splice(i, 1);
}
}
$(document).ready(function () {
$("#btnUpload").click(function () {
var model = $('#addcompanydata').serialize()
var fileInput = $('#files');
var filename = fileInput.files[0].name
formdata.append(filename, fileInput.files[0]);
$.ajax({
type: "POST",
url: '@Url.Action("index", "payment")',
data: { model: model, ids: ids },
dataType: 'json',
traditional: true,
success: function (result) {
console.log(result);
},
})
return false;
});
});
«Prev
Next »
Moderate user : Denmark1
Forum