0

This code, I have used many times before with out a problem. Instead of calculating parent.document.getElementById("itemscost").value + (1.3 * totalDistance) it is displaying the values together on the same line IE: it is displaying 20033.84 instead of calculating 200 + 33.84

parent.document.getElementById("costInput").value = (Math.round(((parent.document.getElementById("itemscost").value) + (1.3 * totalDistance)), 2));
JJJ
  • 32,902
  • 20
  • 89
  • 102
Ben
  • 59
  • 2
  • 7
  • 1
    HTML would help `parent.document` are you sure? – zer00ne Feb 11 '17 at 08:10
  • @zer00ne If the code is in a frame, `parent` accesses the page where the frame is located. HTML isn't needed, `parent.document.getElementById("itemscost").value` is always a string. – JJJ Feb 11 '17 at 08:13

0 Answers0