Jump to content

Sterling £ in text field ?


liamloveslearning

Recommended Posts

Hi everyone, I have a calculator on my page that provides an estimate to a project based on the users input, It displays the value fine, but Id like to have the value preceded by a £ sign, is this possible?

 

webQuote=[5,15,9,7,10,100,1008,123]
function calculate(){
total=0
for(var i=0;i<webQuote.length;i++){
if(document.forms["form1"]["box"+i].checked){
currentPrice = webQuote[i]
} 
else{
currentPrice = 0
}
document.forms["form1"]["box"+i].value=currentPrice
total +=currentPrice
}
document.forms["form1"]["result"].value=total
} 

Link to comment
https://forums.phpfreaks.com/topic/193049-sterling-%C2%A3-in-text-field/
Share on other sites

heres my form too

 

...value="Estimate Cost" onclick="calculate()" />
  <input name="result" type="text" value="dfsdf" style="background-color:transparent;border:medium none;color:#2F4B61;font-size:30px;font-style:italic;font-weight:bold;width:200px;text-align:right;width:290px;" readonly="readonly" />

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.