If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Help with Percentage

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-29-03, 22:12
sajeed sajeed is offline
Registered User
 
Join Date: May 2003
Posts: 16
Help with Percentage

Hi, I have a small db which has my price list, I have 3 fields in it,

1) Item #
2) Item Description
3) Item Price

I want to add a 4th field which is

4) Discount Price

So when I enter the Item Price as $100, then the Discount Price should automatically show $75 (as a 25% discount). Can anyone help me with it?

Thanks for your help in advance.
Reply With Quote
  #2 (permalink)  
Old 09-30-03, 00:02
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Perhaps have the onchange property for the field call a JavaScript function which changes the appropriate field perhaps something like this:

function UpdateTheDiscountPrice() {
document.frmMyForm.MyDiscountPrice.value = document.frmMyForm.MyItemPrice.value * .25;
}

And here's a good JavaScript board:
http://www.codingforums.com/forumdis...p?s=&forumid=2
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On