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
Phaneendra Chakravaram
NA
490
100.1k
how to send data array format in ajax jquery
Dec 3 2017 12:30 AM
its very urgent
i want data like bellow format
data-zs-src="["https://unsplash.it/1600/1607?image=180", "https://unsplash.it/1600/1607?image=170", "https://unsplash.it/1600/1607?image=160"]"
but its came like this
data-zs-src="https://unsplash.it/1600/1607?image=180", "https://unsplash.it/1600/1607?image=170", "https://unsplash.it/1600/1607?image=160"
<div id="demo-1" data-zs-src='' "data-zs-overlay="dots"></div>
$(document).ready(function () {
$.ajax({
url: "https://www.q-tickets.com/qatarcinemas.aspx?type=3",
type: "Get",
success: function (data) {
var obj = JSON.parse(data);
var jdd = obj.Thumbs[1].poster_path;
var ss = "http://www.q-tickets.com/";
var arr = [];
for (var i = 0; i < obj.Thumbs.length; i++) {
console.log(ss + obj.Thumbs[i].poster_path);
var imagesurls = ss + obj.Thumbs[i].poster_path;
arr.push(imagesurls);
//alert(imagesurls)
}
$('#demo-1').attr('data-zs-src',arr);
// $('#amount').data('min', '1000')
},
error: function (msg) { alert(msg); }
});
});
</script>
Reply
Answers (
1
)
ASP.NET MVC - RBAC Security Code Failed
Array matrices...