Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

not updating screen after ajax call

Posted on 2015-02-04
1
Medium Priority
?
66 Views
Last Modified: 2015-02-06
I'm trying to build an import routine that will import multiple tables, what I want to do is get it to do one, then the next and the next, which I've got working, however it doesn't update the page when its got a response.

I've put the code in a jsfiddle, however it should display an error as it cant see the page its posting to.
http://jsfiddle.net/bj7ruvds/1/

I know why its not updating because Ive set "async: true", however if I set "async: false" then it only completes the last row as it doesnt seem to complete all the rows.

Does anyone have any suggestions on how I can either update the page when I get the callback, or execute the ajax calls one at a time and wait for previous to cancel.

Thank you in advance for any support.
0
Comment
Question by:tonelm54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 44

Accepted Solution

by:
Chris Stanyon earned 2000 total points
ID: 40589234
Difficult to know with just your jsfiddle, but a couple of things of note. Your error function won't display the error because you're trying to set the html to 'data' which doesn't exist in your error function. You only have the variables jqXHR, textStatus, errorThrown, so set it to one of them, for example:

$tblRow.find("td:nth-child(4)").html(textStatus);

Open in new window


As to what would happen on success, without seeing exactly what your php script returns, it's impossible to tell.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question