This is a discussion on "Mission Impossible??" within the JavaScript Forum section. This forum, and the thread "Mission Impossible?? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Mission Impossible??
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Mission Impossible??
Hi All:
A total Javascript newbie, here...looking for some help with a small project. Here's the scoop: The scenario is centered around what's called a "Virtual Airline"...member-pilots log into MS Flight Simulator, we're linked to our own website, we can fly together, etc. What I'm trying to do is create an aircraft-loading calculator for htm/html that allows the pilot to select his payload from an Inventory (warehouse) listing. A particular inventory line might show there are 49 cases of Jack Daniels in the warehouse, and he wants to select 4 of them for this trip...he would enter a 4 somewhere on that line; the calculator would: (A) Show the weight for 4 cases of Jack Daniels (preset weight values, of course) and (B) Keep a running total of accumulated weight as he goes down through the inventory selecting other items for his payload, and (C) Deduct his 4 cases from the 49 cases in the warehouse. (The idea is that he ends up with a final-weight number, and the warehouse invemtory gets adjusted) Can this be done? I'll be perfectly honest...I've hacked at a few different Javascript calculators, and...Ummm...well, it didn't work out too good. This can be done by using a separate calculator...find the line, find the weight for 1 case, plug it into the calculator times how many cases he wants, etc...but it would be much slicker if he can just plug a number into a desired item-line. Appreciate any help with this...thanks for your time. Garry (garry@lewisaire.com) |
|
|
|
|||
|
Re: Mission Impossible??
Have you thought about laying your inventory out as a table with the necessary cells for the in-stock, allocated(taken), item weight and total weight values?
An onchange event in the allocated(taken) cells could trigger a JavaScript function that made the necessary calculations. |
|
|||
|
Re: Mission Impossible??
Hi Geoff...thanks for the reply:
Well, no; I hadn't thought of doing that, but it makes sense. The programming for what you're suggesting might be a bit over my head, though, and I'm being generous with the term "might be". And there's no question at all that I could never write the Javascript function. I can create exactly what I'm looking for in Excel, if that would help. In fact, I could put the spreadsheet on the website and have the web page call it up, but the problem there is that it requires the user to have Excel on their own PC, and not everyone does. Thanks for the suggestion...I'll go see what kind of mess I can make fiddling around with Front Page tables :-) Garry |
|
|||
|
Re: Mission Impossible??
As you will find if you search these forums, those of us who regularly give advice think FrontPage is the absolute pits.
You would be far better off in the long run learning to hand code. I don't know of it's current availability, but I once came across an embedded program that let you display an Excel spreadsheet on a web site and maintain much of its functionality. However, I suspect that the code overhead and download time are high. The function(s) you would require is not that complex. If you are familiar with Excel, then work out what you would need to do and then have a look at JavaScript and see how that same functionality could be implemented. |
|
|||
|
Re: Mission Impossible??
Thanks, Geoff:
Yep, I do know that real programmers cringe at the name...Front Page. However, I'm not a real programmer, and FP does allow folks like me to create a working website without having to go back to college. I guess the upshot is the learning curve...this isn't a livelihood, it's a hobby; I need something I can pick up and use right now, not something I'd have to learn as one would learn a new career. (sigh) Anyway, your comment: >>If you are familiar with Excel, then work out what you would need to do and then have a look at JavaScript and see how that same functionality could be implemented.<< I'm okay with Excel (again, a hacker, not a pro), but "have a look at JavaScript and see how that same functionality could be implemented" would be a show-stopper for me; it's over my head, plain and simple. I've created a spreadsheet sample that does exactly what I need...and I've browsed several different Javascript files to see if I can get a grip on how to incorporate it...and the lights are off, nobody's home. Thanks for your time, Geoff, but it's beginning to look like I'm in over my head with this little project. Best regards, Garry |
![]() |
| Tags |
| inventory select program |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is this impossible? | bob_visualefx | Hosting & Domains | 3 | May 26th, 2006 19:57 |
| Asking for the impossible... | Phoenix | Web Page Design | 1 | Feb 12th, 2006 15:34 |