> However, the last lot although accepted as saved did not chage their colour.
How do you know there were accepted as saved? If they didn't change their color they're not accepted as saved.
The process works like so:
- When you reload a page the currently entered orders are loaded, and they are always in green to reflect that they are the current orders stored in the database.
- The orders entered are converted to JSON, a format for neatly transporting structured data to/from JavaScript across HTTP
- The server takes this data, processes it, and returns more JSON data containing the results of the processing. If there is an internal server (500) error, a 404 error, a time-out, anything, no JSON data will be returned, and you will see an error message. (And if you receive an HTTP error code no browser will show a cached page instead, and changes made with javascript aren't cached anyway, and ..., and ...)
- If JSON data is returned it will contain, for each order submitted, the status of that order. Each order is looked up in the returned order status data, and if the order has data indicating a successful process it will turn green and get a tick. If there is an order specific error this error will be posted.
What this means is:
- If the order does not turn green after clicking submit there is no reason to assume it has been submitted! (This is the whole point of having orders change color).
- If you reload the page the orders will always be in green. If you reload the page and the orders are not in green you can't have reloaded the page; only selecting an alternate choice from a drop-down can change an order component to red.