|
|
|
|
|
|
|
|
|
|||||||
| UKA Garage Need help with hardware? See if our army of boffins can help... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Ed.
Site Admin
Join Date: Jun 2004
Location: 3 floors up
Posts: 9,257
|
I don't suppose anyone knows enough about Javascript to help e tweak a bit of code? It's driving me nuts.
Remuneration will of course be awarded, the nature of which will depend entirely on who helps. At the very least I'd pay for a manga/DVD of your choice (up to a sensible limit of course
__________________
[N]eko friendly |
|
|
|
|
|
#2 |
|
「遊びは終わりだ」
Join Date: Mar 2010
Location: Nottingham
Posts: 2,761
|
Depends what it is you need, but I've done my fair share of JavaScript over the years.
__________________
"If there's anything more important than my ego around, I want it caught and shot now!" MyAnimeList | MyFigureCollection | Twitter | Tumblr | Blog |
|
|
|
|
|
#3 |
|
Ed.
Site Admin
Join Date: Jun 2004
Location: 3 floors up
Posts: 9,257
|
I have a PriceNet and a PriceGross (inc VAT) box in a form, and editing one updates the other (form OnKeyUp command). we currently read the VAT rate from the product record and this works ok.
However, we now have multiple VAT levels (5% and 20%) stored in a separate table, and these are selected from a dropdown - so all I need to know is how to move the correct VAT rate from this table into the Javascript to work out the correct prices. Is that something that sounds do-able from your perspective?
__________________
[N]eko friendly |
|
|
|
|
|
#4 |
|
「遊びは終わりだ」
Join Date: Mar 2010
Location: Nottingham
Posts: 2,761
|
That's something I'd probably do with some AJAX magic. But you should be able to grab the VAT rate from your dropdown with something like:
var e = document.getElementById("vatrate"); // where vatrate is your vat dropdown var selectedRate = e.options[e.selectedIndex].value; // and the dropdown value's set to the vat rate then calc/set the PriceGross as you always did. also you could trigger the same function from an onchange event from the VAT select, so it updates when the VAT rate changes or the PriceX boxes change.
__________________
"If there's anything more important than my ego around, I want it caught and shot now!" MyAnimeList | MyFigureCollection | Twitter | Tumblr | Blog Last edited by megalomaniac; 29-08-2012 at 03:34 PM. |
|
|
|
|
|
#5 |
|
Ed.
Site Admin
Join Date: Jun 2004
Location: 3 floors up
Posts: 9,257
|
I'll give that a go, thank you
Actually, nuts, I'll have to do it in the morning as I have a client house-call to make >< Very much appreciate the help though, will let you know how I get on - compensation will be arranged
__________________
[N]eko friendly |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|