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
Guest User
Tech Writer
2.1k
479.8k
Ajax call back is not downloading my file format
Nov 11 2019 2:26 AM
Hi Team
I have this following code, i am using thingspeak cloud API, but if i send this request directly from the browser it seem to work and download it as CVS file. But i want my button when using Ajax call request to work the same as when requesting it to the browser to be able to download it as a CVS file. i am following this link and seem it does not work well and dont know why, https://nl.mathworks.com/help/thingspeak/readdata.html
$(document).ready(function() {
$("#download").click(function() {
$.ajax({
url:'https://www.thingspeak.com/channels/899906/feeds.csv?api_key=***&results=3',
type:'POST',
dataType:'json',
success:function(response){
window.location = response;
}
});
});
});
Reply
Answers (
1
)
Not Run For Loop
Secure Web api .