# Search:

Type: Posts; User: pimpmaster; Keyword(s):

1. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### After attempting to bribe people to do this for...

After attempting to bribe people to do this for me, I actually made some progress on my own:

http://funkysoulrebels.com/calculator/

By god I am starting to actually understand this!

There...
2. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### LOL.. sometimes coding late at night is not the...

LOL.. sometimes coding late at night is not the best idea. After racking my brain for a good hour, I realized that finding a charge by percent is a mathematical impossibility (unless I am calculating...
3. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Argh.. I been trying to hook this up so that I...

Argh.. I been trying to hook this up so that I can also type inside the percentage field and have that deduct the charge field (will do profit too once I figure this out) So far I havent been...
4. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Thanks for taking the time to explain.. you make...

Thanks for taking the time to explain.. you make it sound so easy!

I suppose my problem with examples like these is that I tend to prefer explicit over clever code. I program in Ruby so maybe that...
5. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Thanks for the code John..I cant believe how...

Thanks for the code John..I cant believe how small a footprint it has. Of course I cant understand a word of it :P.

Trinithis's solution was more verbose, but I managed to twist it to suit my...
6. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### I have one last fish to fry before I go modular....

I have one last fish to fry before I go modular.

This one is truly baffling

var vdiscount = discount.value.trim();
var ndiscount = 1 - ((vdiscount*1)/100);

subtotal.value =...
7. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Woops! After testing this out thoroughly its...

Woops!

After testing this out thoroughly its not working just yet. Im still stepping on my own toes it seems and the calculations are not accurate when I add multiple events.

Gonna sleep on...
8. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Actually, now that this is working, I have one...

Actually, now that this is working, I have one last question.

At some point I will need to have multiple rows of these fields and I'm wondering how I can make this code more dynamic..IOW somehow...
9. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Got it! addEvent( [cost, percent],...

Got it!

[cost, percent],
"keyup",
function(f) {
var vcost = cost.value.trim();
var vpercent = percent.value.trim();
var ncost = vcost*1;
10. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Wow.. you certainly write some lovely code there....

Wow.. you certainly write some lovely code there. So clear and easy to follow!

It works a charm, although now just out of curiosity I wonder if I can extend it so that typing in a percentage will...
11. ## Thread: Live Field Calculations

by pimpmaster
Replies
21
Views
4,841

### Live Field Calculations

An image is worth a thousand words so:

http://funkysoulrebels.com/calc.gif

I basically want to have the user input the first two fields and have the last two get automagically calculated.
...
Results 1 to 11 of 11