{"id":1499,"date":"2024-04-17T09:15:40","date_gmt":"2024-04-17T11:15:40","guid":{"rendered":"https:\/\/the-girls.co.za\/?page_id=1499"},"modified":"2024-05-17T11:48:48","modified_gmt":"2024-05-17T13:48:48","slug":"calculate-page","status":"publish","type":"page","link":"https:\/\/the-girls.co.za\/?page_id=1499","title":{"rendered":"Calculate Page"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Brick Calculator<\/title>\n\n<style>\n\n    .wall-group {\n        margin-bottom: 20px;\n    }\n\n    \n\n    .myinput {\n        background-color: lightblue;\n    }\n\n <\/style>\n    <script>\n        function updateDisplay(inputId, displayId) {\n        var input = document.getElementById(inputId);\n        var display = document.getElementById(displayId);\n        var multipliedValue = input.value * 1000;\n        display.innerText = multipliedValue + \" mm\";\n        }\n    <\/script>\n\n<\/head>\n\n\n<body>\n     <h1>Calculations<\/h1>\n     <h3>Estimated number of Bricks required Building a wall<\/h3>\n    <form id=\"brickForm\">\n        <h2>Future Wall Dimensions<\/h2>\n        \n        <div class=\"wall-group\">\n         <p> Height (m): <input type=\"number\" style=\"width:60px;\" class=\"myinput\" id=\"wallHeight\" oninput=\"updateDisplay('wallHeight', 'heightDisplay')\" \n          required> <span id=\"heightDisplay\"> 0 mm<\/span> <\/p>\n\n        Width (m): <input type=\"number\" style=\"width:60px;\" class=\"myinput\" id=\"wallWidth\" oninput=\"updateDisplay('wallWidth', 'widthDisplay')\"  required>\n        <span id=\"widthDisplay\">0 mm<\/span>\n        <p><\/p>\n        <p>Type of wall \n            <select id=\"wallType\" class=\"myinput\" style=\"width:90px;\"> \n                <option value=\"1\">Single<\/option>\n                <option value=\"2\">Double<\/option>\n\n            <\/select>\n        \n        <\/p>\n        \n        <br>\n        <h2>Brick Dimensions<\/h2>\n        <\/div>\n      \n        <p><b>Brick<\/b><\/p>\n        <p>Height (mm): <input type=\"number\" class=\"myinput\" style=\"width:60px;\"  id=\"brickHeight\" value=\"73\"  required><\/p>\n        <p>Width   (mm): <input type=\"number\" class=\"myinput\" style=\"width:60px;\" id=\"brickWidth\" value=\"106\"  required><\/p>\n        <p>Length (mm): <input type=\"number\" class=\"myinput\" style=\"width:60px;\" id=\"brickLength\" value=\"222\"  required><\/p>\n\n\n\n\n        <p>Mortar Thickness (mm):\n            <select id=\"mortarThickness\" class=\"myinput\" style=\"width:80px;\">\n                <option value=\"10\">10<\/option>\n                <option value=\"8\">8<\/option>\n                <option value=\"6\">6<\/option>\n                <option value=\"4\">4<\/option>\n                <option value=\"3\">3<\/option>\n            <\/select>\n             \n        <\/p>\n\n        <input id=\"mybutton\" type=\"button\" value=\"Calculate\" onclick=\"calculateBricks()\">\n        \n    <\/form>\n\n    <p>Number of Bricks Required:<\/p>\n    <p id=\"numberOfBricks\"><b>Bricks required will be displayed here.<\/b><\/p>\n\n    <script>\n\n\n       \n\n        function calculateBricks() {\n            var wallHeight = parseFloat(document.getElementById('wallHeight').value) * 1000;  \/\/ Convert meters to millimeters\n            var wallWidth = parseFloat(document.getElementById('wallWidth').value) * 1000;  \/\/ Convert meters to millimeters\n            var wallType =  parseFloat(document.getElementById('wallType').value) * 1; \n\n              \/\/ Check if wallHeight and wallWidth have values\n            if (isNaN(wallHeight) || isNaN(wallWidth)) {\n                document.getElementById('numberOfBricks').innerText = \"Please enter both wall height and wall width.\";\n                document.getElementById('numberOfBricks').style.color = \"red\";\n                return;\n            }\n\n\n\n            var brickHeight = parseFloat(document.getElementById('brickHeight').value);\n            var brickWidth = parseFloat(document.getElementById('brickWidth').value);\n            var brickLength = parseFloat(document.getElementById('brickLength').value);\n            var mortarThickness = parseFloat(document.getElementById('mortarThickness').value);\n\n            \/\/ Adjusting brick dimensions to include mortar thickness\n            brickHeight += mortarThickness;\n            brickWidth += mortarThickness;\n            brickLength += mortarThickness;\n\n            \/\/ Calculating the number of bricks along each dimension\n            var bricksAlongHeight = Math.ceil(wallHeight \/ brickHeight);\n            var bricksAlongWidth = Math.ceil(wallWidth \/ brickWidth);\n            \/\/ The number of bricks is the product of bricks along each dimension\n            var totalBricks = bricksAlongHeight * bricksAlongWidth * wallType;\n\n            document.getElementById('numberOfBricks').innerText = \"Approximately \" + totalBricks + \" bricks required.\";\n            document.getElementById('numberOfBricks').style.color = \"blue\";\n        }\n    <\/script>\n<\/body>\n<\/html>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Brick Calculator Calculations Estimated number of Bricks required Building a wall Future Wall Dimensions Height (m): 0 mm Width (m): 0 mm Type of wall SingleDouble Brick Dimensions Brick Height (mm): Width (mm): Length (mm): Mortar Thickness (mm): 108643 Number of Bricks Required: Bricks required will be displayed here.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1499","page","type-page","status-publish","hentry"],"blocksy_meta":[],"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>Brick Calculator Calculations Estimated number of Bricks required Building a wall Future Wall Dimensions Height (m): 0 mm Width (m): 0 mm Type of wall Single Double Brick Dimensions Brick Height (mm): Width (mm): Length (mm): Mortar Thickness (mm): 10 8 6 4 3 Number of Bricks Required: Bricks required will be displayed here.<\/p>\n","category_list":"","author_info":{"name":"d3y50","url":"https:\/\/the-girls.co.za\/?author=1"},"comments_num":"0 comments","_links":{"self":[{"href":"https:\/\/the-girls.co.za\/index.php?rest_route=\/wp\/v2\/pages\/1499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the-girls.co.za\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/the-girls.co.za\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/the-girls.co.za\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/the-girls.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1499"}],"version-history":[{"count":98,"href":"https:\/\/the-girls.co.za\/index.php?rest_route=\/wp\/v2\/pages\/1499\/revisions"}],"predecessor-version":[{"id":1616,"href":"https:\/\/the-girls.co.za\/index.php?rest_route=\/wp\/v2\/pages\/1499\/revisions\/1616"}],"wp:attachment":[{"href":"https:\/\/the-girls.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}