Skip to main content
Inspiring
December 29, 2009
Question

Is this a javascript question?

  • December 29, 2009
  • 2 replies
  • 976 views

Good evening all,

I have to build a web app that mirrors an Access app that is VB based. One problem I am having is in our Inspection Form. I used <cfloop list = j> to perform a list qualify but, what I need is:

1. Have users inspect products

2. Identify how many products inspected

3. Identify the defective products on an order

4. Identify the specific defect per specific product without re-entering the order

5. Complete the inspection then enter the new order

For example, order J32579 has 15 products. Product 1 has Cracked Bulb and 14 has Gum in the case.

I want to enter J32579 in Orders with ID 235 then, Product Defective in Defects with:

ID   Unit Defect Order

235  1     19     J32579

235 14     7      J32579

I can write the query but, I am unsure about how to correlate the unit to defect without entering the order number twice. I know its late.

Thanks in advance,

djkhalif

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
January 9, 2010
Is this a javascript question?

No. From your explanation, it has little or nothing to do with Javascript.

Inspiring
December 29, 2009

Yes it's a javascript question.  At least to develop the form. I'd do something like this:

<cfsavecontent variable = "whatever">

cf html code to produce a text box (or two) and a set of checkboxes, one for each possible defect.

Pass this variable to javascript.   Write two javascript functions.  One adds a div containing the stuff from the cfsavecontent.  The other adds a submit button.  For the first one, you are going to have to do some fancy coding to add numbers to the end of the form fieldnames so you can marry up the text boxes and checkboxes on your action page.

Give the user two things to select.  They will call the two javascript functions.

Somewhere on your action page, you will have to loop through either the form collection or the form.fieldnames list, whichever you are more comfortable with.

djkhalifAuthor
Inspiring
December 29, 2009

Hi Dan,

After thinking about it, this will be the same as a shopping cart. The first defects and products will be stored but the first form will create an order id for the initial entry. Essentially, the products and defects go into the cart and can be added to. I will have to create a session id that will speak to both tables. Any input is valuable.

Thanks,

djkhalif