Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #15576
| Date | 2012-08-26 20:55 +0200 |
|---|---|
| From | SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Sum of several fields using parseInt differs from that of using a calculator |
| References | <24572a83-a8c2-4e00-99b2-383206781c09@d13g2000yqm.googlegroups.com> <50391bc8$0$6183$ba4acef3@reader.news.orange.fr> <5c08b4d4-5162-4580-9c9e-d23937e046e2@z17g2000yqk.googlegroups.com> <5039ec17$0$6192$ba4acef3@reader.news.orange.fr> <1e52efa2-bcfe-45f6-a005-608614428fbb@k3g2000yqo.googlegroups.com> |
| Message-ID | <503a712f$0$6195$ba4acef3@reader.news.orange.fr> (permalink) |
| Organization | les newsgroups par Orange |
Le 26/08/12 15:26, justaguy a écrit :
> On Aug 26, 5:27 am, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
>>
>> More, you could add tabindexes to quantity textfields to help visitor
>>
>> --
>> St phane Moriaux avec/with iMac-intel
Try to do not copy the signature in your response
Try to explain GoogleMail what is an accented letter.
> Sorry, I meant "cursor".
;-)
> Back to what a poster mentioned earlier about posting the entire
> rendered HTML form here. Here we go.
the code or an url we can go to see.
> We still have a problem when a
> user goes back to change a quantity, then subtotal changes, total
> changes, and we don't know if the quantity is increased or decreased.
And ? What's the matter with that ?
> Please copy/paste the following FORM to take a look. Many thanks.
a little bit laborious ...
But that seems to work.
About the question of in/de-crease you would have not to worry about as
that is the complete (all the) form which will be send, analyzed by the
php, and then the buyer receive back the correct command it did
(calculated on server-side).
> <table width="85%" align="center">
arrrgghhh !
a table :-(
(to shape the presentation)
with its poor accessibility
<input type="text" id="qty" name="qty"
onBlur="if(document.getElementById('total').value < 1)
// why this distinction ?
{
document.getElementById('total').value=
this.value * document.getElementById('priceLabel').value;
document.getElementById('totalFinal').value=
document.getElementById('total').value;
}
else
{
document.getElementById('total').value=0; // hu ?
document.getElementById('total').value=
document.getElementById('qty').value *
document.getElementById('priceLabel').value;
document.getElementById('totalFinal').value=document.getElementById('total').value;
}">
idea :
======
<input type="text" id="qty" name="qty"
onBlur="
if(this.value<0) {
alert('Quantity can\'t be negative !');
this.value = 0;
this.focus();
this.select();
}
document.getElementById('total').value=
this.value * document.getElementById('priceLabel').value;
document.getElementById('totalFinal').value=document.getElementById('total').value;
}"
onclick="this.select()">
--
Stéphane Moriaux avec/with iMac-intel
* Unknown - détecté
* Anglais
* Français
* Espagnol
* Anglais
* Français
* Espagnol
<javascript:void(0);>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Sum of several fields using parseInt differs from that of using a calculator justaguy <lichunshen84@gmail.com> - 2012-08-25 06:18 -0700
Re: Sum of several fields using parseInt differs from that of using a calculator Martin Honnen <mahotrash@yahoo.de> - 2012-08-25 15:39 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator justaguy <lichunshen84@gmail.com> - 2012-08-25 09:27 -0700
Re: Sum of several fields using parseInt differs from that of using a calculator Denis McMahon <denismfmcmahon@gmail.com> - 2012-08-25 18:53 +0000
Re: Sum of several fields using parseInt differs from that of using a calculator SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-26 11:13 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator Dr J R Stockton <reply1234@merlyn.demon.co.uk.invalid> - 2012-08-26 18:54 +0100
Re: Sum of several fields using parseInt differs from that of using a calculator SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-25 20:39 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator justaguy <lichunshen84@gmail.com> - 2012-08-25 14:07 -0700
Re: Sum of several fields using parseInt differs from that of using a calculator Martin Honnen <mahotrash@yahoo.de> - 2012-08-26 11:23 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-26 11:27 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator justaguy <lichunshen84@gmail.com> - 2012-08-26 06:26 -0700
Re: Sum of several fields using parseInt differs from that of using a calculator justaguy <lichunshen84@gmail.com> - 2012-08-26 08:48 -0700
Re: Sum of several fields using parseInt differs from that of using a calculator SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-26 20:55 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator Denis McMahon <denismfmcmahon@gmail.com> - 2012-08-26 20:50 +0000
Re: Sum of several fields using parseInt differs from that of using a calculator "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-08-26 21:30 +0000
Re: Sum of several fields using parseInt differs from that of using a calculator Denis McMahon <denismfmcmahon@gmail.com> - 2012-08-26 22:29 +0000
Re: Sum of several fields using parseInt differs from that of using a calculator SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-26 23:32 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator Denis McMahon <denismfmcmahon@gmail.com> - 2012-08-26 22:39 +0000
Re: Sum of several fields using parseInt differs from that of using a calculator SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-27 04:23 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-08-27 11:09 -0600
Re: Sum of several fields using parseInt differs from that of using a calculator Stefan Weiss <krewecherl@gmail.com> - 2012-08-28 02:14 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-28 14:53 +0200
Re: Sum of several fields using parseInt differs from that of using a calculator Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-08-28 11:29 -0600
Re: Sum of several fields using parseInt differs from that of using a calculator "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-08-25 12:44 -0700
csiph-web