After a few weeks off, we’re back to it! Hopefully, you’ve done your homework and are caught up
We’ve been working over the last several sessions on laying down some supporting pieces for some real functionality within our application. Not that we haven’t been doing “real” stuff to this point; but most of the pieces have been admittedly simple and are parts of the app that will be used infrequently. That is, managing car colors, categories, makes and models isn’t particularly “business logic”–they’re just ancillary (although necessary) parts of a greater whole.
But now that we have several of these foundational elements in place, we can really start plugging away at the core purpose of our app, which is Inventory Management.
So without further ado, let’s get to it.
Our Goals for this Session
NOTE: The code for this session can be found on GitHub.
In this installment, we want to tackle the following:
- Build an Inventory Form for entering data
- Wire up form to a new controller for adding/editing inventory records
- Display inventory records in a grid (surprise, surprise!)
- Build a search form for our inventory records
Our inventory management form is actually going to be a bit complex (not in difficulty, but in data collection), so we won’t actually finish the whole thing More >
A rather annoying issue I ran into this evening when testing my up-and-coming CSS gallery on a live server was that all of my cross-domain AJAX calls were failing in Firefox. I'm used to stuff failing for stupid reasons in IE, but this one was unique. I tested in Safari (for Windows), IE 7, and Opera–all of them worked beautifully. But for whatever reason, Firefox horked on the code.
Well, it turns out it was a simple fix. In my AJAX calls, I was using the Spry loadURL() function. For this function, you can specify whether the call should be a "POST" or "GET" method. I assumed for my remote calls that I would be doing POST methods.
After all was said and done, it was apparently the POST methods that Firefox was having a coniption over. I changed the methods really quickly to GETs, and everything worked again in all browsers.
As I am mostly stupid, I have no reason why this happened–however, perhaps this will be useful to some other poor code monkey out there who is betrayed by Firefox in the wee-hours of the night, and maybe a wiser soul would be kind enough to post a comment about More >