Hi,
I've a character counter set up in my form. It's to do with engravings and I'm therefore not interested in counting the space marks. Once counted I then multiply by a number currently 0.65.
At the moment I have:
My main interest is setting up the counter without couning the space marks... How would I go about doing this?
Thanks,
Richard
ps. some background on my complete aim is:
that it seems quite messy. There are several fields where this is being used, so ideally I'd like to move the javascript to an external file and pass the field names through to a function.
something like countup('fieldname','showcountfield','priceaddfield','0.65')
I've a character counter set up in my form. It's to do with engravings and I'm therefore not interested in counting the space marks. Once counted I then multiply by a number currently 0.65.
At the moment I have:
Code:
<textarea name="engraving25" id="engraving25" class="inputbox-nowidth"
onKeyup="document.checkout.showcount25.value=document.checkout.engraving25.value.length;
document.checkout.priceadd25.value=(document.checkout.engraving25.value.length)*0.65;"></textarea>
<label for="showcount25">Characters</label>
<input type="text" name="showcount25" id="showcount25" value="0" class="inputbox-nowidth" size="3" readonly />
<label for="priceadd25">Price Addition</label>
£<input type="text" name="priceadd25" id="priceadd25" value="0" class="inputbox-noshow" size="3" readonly />
My main interest is setting up the counter without couning the space marks... How would I go about doing this?
Thanks,
Richard
ps. some background on my complete aim is:
that it seems quite messy. There are several fields where this is being used, so ideally I'd like to move the javascript to an external file and pass the field names through to a function.
something like countup('fieldname','showcountfield','priceaddfield','0.65')