I am trying to create a simple calculation script to result in how many boxes of tiles are required for certain square metre coverage.
You enter 2.5 square metres - click calculation and then you get you will need x amount of boxes with 7 tiles spare. All works perfectly in all browsers except Firefox I get the error in the firebug console "wallarea not defined" (I do not understand this) I am not a coder I am trying to learn so if you can help please be as detailed as you can and help explain why this is an issue. Thanks :D
The code:
You enter 2.5 square metres - click calculation and then you get you will need x amount of boxes with 7 tiles spare. All works perfectly in all browsers except Firefox I get the error in the firebug console "wallarea not defined" (I do not understand this) I am not a coder I am trying to learn so if you can help please be as detailed as you can and help explain why this is an issue. Thanks :D
The code:
Code:
<p>To calculate how many boxes of these tiles you can use our handy calculator</p> <p> I need to cover<input type="text" id="wallarea" size="6" /> square metres. <input type="button" onclick="calcTiles(<?php echo $product_width ?>, <?php echo $product_height ?>, <?php echo $product_packaging_unitsinbox ?>, wallarea.value, 'total_boxes'); return false;" value="Calculate" class="addtocart_button" /> </p> <p><span id="total_boxes"></span></p> </div>
Comment