Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

My app is a quote generation program.

Guest
Apr 21, 2009 Apr 21, 2009

It involves entering customer info, then entering the price level, then entering the parts the customer needs.  When entering parts (there are >4000 parts), the form allows you to enter the part number and the quantity needed.  The form is then submitted and a query determines the description and price (based on the price level you chose), and you get an output that looks like:

P/N     Description    Quantity     Unit Price     Extended Price

Then, if everything looks good, you submit that part to the quote and you're sent back to the form where you enter another part and its quantity.  Every once in a while, the salesweasel will enter a quantity of 1 when he meant to enter a quantity of 2.  That's easy enough to fix, just use the Browser Back button and change the quantity.  What they would like to do is change any given part's Unit Price and then the Extended Price would change also, and then the modified information is submitted to the quote.  But this change in price would only be in effect for that particular quote.  The true Unit Price in the database doesn't change.

So I'm envisioning an output like what is above but with a Recalc button so if you change the Unit Price the Extended Price reflects the change.  Then if it's OK the part gets submitted to the quote and you're sent back to select another part.

I can see what I want to do in my little punkin head.  I just can't figure out how to do it.  Help if you can.

Brendan

631
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 21, 2009 Apr 21, 2009

Have the unit price in a text box.  Give that input tag an onchange event that calls a javascript function that adjusts the extended price accordingly.  You can display this extended price in a disabled text box, or in a div or span.  However, you also need a hidden form field if you want to submit it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 14, 2009 May 14, 2009

I understand the text box and the onChange event but I know diddly about javascript.  I'm looking all over various javascript sites and have come up empty handed.  So I'm back at 0 except I have a bunch of javascript pages bookmarked.   bb

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 14, 2009 May 14, 2009

Having bought a copy myself, I personally recommend the book, "Teach Yourself Javascript in 24 Hours".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 14, 2009 May 14, 2009
LATEST

thx. just ordered it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources