| re: calculation within a form
Lee wrote:
[color=blue]
> elji said:
>
>[color=green]
>><input name="price" type="text" id="price" value="100" size="4">
>><input name="quantity" type="text" id="quantity" value="1" size="2">
>><input name="shipping" type="radio" value="slow">
>><input name="shipping" type="radio" value="fast">
>><input name="total" type="text" id="total" size="8">
>>
>>I 'd like that when someone checks the first radiobutton (slow),
>>the "total" textfield shows: price x quantity + 5
>>
>>and when someone checks the second radiobutton (fast),
>>the "total" textfield shows: price x quantity + 10
>>
>>
>>Sadly, I don't know javascript, but there's got to be an easy way to do
>>that, right?[/color]
>
>
> Is this for a class?
> It seems too simplistic to be for a real website, and I'd hate
> to think that somebody who doesn't know Javascript would try
> to create a commercial web site. You could open yourself to
> all sorts of legal and financial problems.
>[/color]
No, that's not for a class, this looks simplistic, but that's only a
part of a very large form, but I've only shown here where my problem is.
And yes, I hardly know javascript, but my commerce is not about programming. |