i have this code which copies value in div to text field but the value doesnt copy instead i getDisplay the result here what am i doing wrong but still display the right value in div
<div class="myDiv1" id="demo_score">Display the result here.</div>
<input type="text" value="" id="myTextBox1" />
<script>
var myTextBox1 = $("#myTextBox1");
var myText1 = $(".myDiv1").text();
myTextBox1.val(myText1);
document.getElementById("demo_score").innerHTML = ({BIDTOTAL} / {TOTALUSER1} * {HOUSE_COMMISSION} > {MIN_BIDS}) ? '<div id="high"></div>' : '<div id="low"></div>';
</script>
<script>
var x = ( {BIDTOTAL} / {TOTALUSER1} ) * {HOUSE_COMMISSION} ;
document.getElementById("high").innerHTML = x;
</script>
<script>
var x = {MIN_BIDS} ;
document.getElementById("low").innerHTML = x;
</script>