liamloveslearning Posted February 23, 2010 Share Posted February 23, 2010 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 } Quote Link to comment https://forums.phpfreaks.com/topic/193049-sterling-%C2%A3-in-text-field/ Share on other sites More sharing options...
liamloveslearning Posted February 23, 2010 Author Share Posted February 23, 2010 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" /> Quote Link to comment https://forums.phpfreaks.com/topic/193049-sterling-%C2%A3-in-text-field/#findComment-1016695 Share on other sites More sharing options...
developerdave Posted February 23, 2010 Share Posted February 23, 2010 Simple answer is changing the pages charset. But this may cause other issues. I tend to just make them background images and pad the left side. Quote Link to comment https://forums.phpfreaks.com/topic/193049-sterling-%C2%A3-in-text-field/#findComment-1016799 Share on other sites More sharing options...
liamloveslearning Posted February 23, 2010 Author Share Posted February 23, 2010 Brilliant idea, thanks dave Quote Link to comment https://forums.phpfreaks.com/topic/193049-sterling-%C2%A3-in-text-field/#findComment-1016807 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.