Hi Friends i am new to Java i want to create A Java Script to be implemented on http://hydbullion.org its a calculating script like this This Value Editable 675.20 + 1.30 This Value Editable * 43.10 This Vale Fixed * 31.99 This Vale Fixed + 10300 This Vale Fixed * 101 This Vale Fixed / 100 And The Final Answer =675.20+1.30*43.10*31.99+10300*101/100=952467 I Will Be Great Full If Some One Can create This Script For Me Regards Kikan
Umm... I guess you mean something like this? <input id="i1" type="text" /> <input id="i2" type="text" /> <input type="button" onclick="calculate();" /> <script type="text/javascript"> function calculate() { var myAnswer = eval(document.getElementById("i1").value) + 1.3 * eval(document.getElementById("i2").value) * 43.10 * 31.99 + 10300 * 101 / 100; alert(myAnswer); } </script> Code (markup):
From looking at your code I think you need... var Gold = eval(document.frmData.Gold.value) var Exchange = eval(document.frmData.Exchange.value) Code (markup):
What doesn't work about it? I uploaded it to my site and it seems to work fine... http://giraph.com/test.php