Re: [SLUG] Javascript Problem

From: Paul M Foster (paulf@quillandmouse.com)
Date: Sun Oct 15 2006 - 23:31:45 EDT


Daniel Jarboe wrote:
>> Thanks. This works as advertised, though minor changes break it. Hmm.
>
> You're welcome. Minor changes like what? If you modify code so it is
> no longer valid, then yes, it will stop working. That's what happens
> for any solution in any language.

For example, it you take out the if test and just convert the input to a
number directly.

Yeah, that makes it no longer valid somehow, but I'm not familiar enough
with Javascript to understand why.

>
>> It's all part of a large project to transfer our invoicing and such from
>> FoxPro to PHP/PostgreSQL. Under the circumstances, AJAX and Javascript
>> appear to be the ideal solutions to certain problems. I'm just not
>> conversant enough with those technologies. So I'm trying to get a leg up
>> (or two).
>
> It sounds like you've already decided on your tools. Fortunately,
> PHP/Javascript/DOM are popular and well-documented, good luck.

Mainly PHP and PostgreSQL. PHP is *very* much like C, and I've
programmed in C for years, so it's an easy transition. I just had to get
used to the fact that the HTTP protocol does not store state
information, so you have to carry it with you from page to page.

With invoicing, the problem was that the user had to go to a screen an
enter the number of line items he wanted on the invoice, then another
screen that then showed the blanks for the line items. The javascript
problem I originally posed was supposed to eliminate one more screen.
The next issue is to fill in invoice defaults based on the user-selected
customer record. The idea is to eliminate yet another screen. But that
will require full on AJAX, and I'm still researching how to do AJAX with
databases.

Anyway, thanks again.

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:00:37 EDT