<!–
═══════════════════════════════════════════════════════════════
HESAPLAYICI BİLGİLERİ
═══════════════════════════════════════════════════════════════
📌 URL: https://www.odemelimaaslara.com/vucut-yuzeyi-alani-hesaplama/
📋 Başlık: Vücut Yüzeyi Alanı Hesaplama (BSA)
🏷️ Shortcode: [body-surface-area-calculator]
🔑 PREFIX: bsa
🌍 Diller: TR, EN
📅 Son Güncelleme: 19 Ekim 2025
💡 NOTLAR:
– 10 farklı BSA formülü (DuBois, Mosteller, Haycock, vb.)
– Tıbbi ilaç dozajı ve kardiyolojide kullanılır
– Boy ve kilo ile hesaplama (m² olarak sonuç)
– BMI de hesaplanıyor
═══════════════════════════════════════════════════════════════
–>
<!– Custom HTML Shortcode başlangıcı –>
<!– Mobil uyum –>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no”>
<style>
* { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; box-sizing: border-box; }
#bsa-hesaplayici { font-family: ‘Inter’, -apple-system, BlinkMacSystemFont, ‘Segoe UI’, Roboto, sans-serif; width: 100%; max-width: 100%; overflow-x: hidden; margin: 0; padding: 0; }
#bsa-notification { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: #2d3748; color: white; padding: 12px 20px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 10000; display: none; max-width: 90%; font-size: 14px; text-align: center; }
.bsa-container { max-width: 800px; margin: 10px auto; background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid #cbd5e0; padding: 20px; box-sizing: border-box; color: #2d3748; }
.bsa-container h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; margin-top: 0; color: #1a365d; line-height: 1.3; }
.bsa-container p { font-size: 13px; margin: 0 0 12px 0; color: #718096; line-height: 1.4; }
.bsa-uyari { background: #e0f2fe; border: 1px solid #0ea5e9; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 11px; color: #075985; font-weight: 600; line-height: 1.4; }
.bsa-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 16px; }
.bsa-method-btn { padding: 10px 8px; border: 2px solid #e2e8f0; background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.2s; color: #2d3748; touch-action: manipulation; user-select: none; }
.bsa-method-btn:active { transform: scale(0.98); }
.bsa-method-btn.active { background: #4a6cf7; color: #fff; border-color: #4a6cf7; box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3); }
.bsa-input-group { margin-bottom: 12px; }
.bsa-label { display: block; margin-bottom: 6px; font-weight: 600; color: #4a5568; font-size: 13px; }
.bsa-input, .bsa-select { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 16px; background: #ffffff; box-sizing: border-box; color: #2d3748; -webkit-appearance: none; -moz-appearance: none; appearance: none; transition: border-color 0.2s, box-shadow 0.2s; }
.bsa-input:focus, .bsa-select:focus { outline: none; border-color: #4a6cf7; box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15); background: #ffffff; }
.bsa-units-wrapper { display: flex; gap: 8px; align-items: stretch; }
.bsa-units-wrapper .bsa-input { flex: 1; min-width: 0; }
.bsa-units { display: flex; gap: 4px; background: #f7fafc; padding: 4px; border-radius: 8px; flex-shrink: 0; }
.bsa-units button { padding: 10px 14px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; color: #718096; transition: all 0.2s; touch-action: manipulation; user-select: none; }
.bsa-units button:active { transform: scale(0.95); }
.bsa-units button.active { background: #fff; color: #4a6cf7; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.bsa-radio { display: flex; gap: 20px; margin-top: 8px; }
.bsa-radio label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; font-size: 15px; }
.bsa-radio input[type=”radio”] { width: 20px; height: 20px; cursor: pointer; }
.bsa-button-group { display: flex; gap: 10px; margin-top: 16px; }
.bsa-btn { flex: 1; min-width: 120px; padding: 14px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; touch-action: manipulation; user-select: none; }
.bsa-btn:active { transform: scale(0.98); }
.bsa-btn-primary { background: #4a6cf7; color: white; box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3); }
.bsa-btn-primary:active { background: #3d5de6; }
.bsa-btn-secondary { background: #edf2ff; color: #4a6cf7; border: 2px solid #cbd5e0; }
.bsa-btn-secondary:active { background: #dce4ff; }
.bsa-result-panel { margin-top: 20px; padding: 18px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }
.bsa-result-title { font-size: 18px; font-weight: 700; color: #1a365d; margin-bottom: 15px; margin-top: 0; }
.bsa-result-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; }
.bsa-result-label { color: #4a5568; font-weight: 500; font-size: 14px; flex: 1; min-width: 120px; }
.bsa-result-value { color: #2d3748; font-weight: 600; font-size: 14px; text-align: right; }
.bsa-result-highlight { margin-top: 15px; padding: 20px; background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4); }
.bsa-result-highlight-label { font-size: 14px; color: #e0f2fe; margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.bsa-result-highlight-value { font-size: 38px; font-weight: 700; color: #ffffff; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.bsa-result-highlight-unit { font-size: 20px; color: #bae6fd; margin-left: 4px; }
.bsa-formulas { margin-top: 15px; padding: 12px; background: white; border-radius: 8px; }
.bsa-formula-item { padding: 8px; margin-bottom: 6px; background: #f7fafc; border-radius: 6px; font-size: 12px; }
.bsa-formula-name { font-weight: 600; color: #1a365d; margin-bottom: 4px; }
.bsa-formula-value { color: #4a5568; }
.bsa-actions { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.bsa-action-btn { flex: 1; min-width: 90px; padding: 9px 10px; background: #4a6cf7; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; touch-action: manipulation; user-select: none; }
.bsa-action-btn:active { transform: scale(0.98); background: #3d5de6; }
.bsa-action-btn.bsa-report { flex: 1 1 100%; background: #edf2ff; color: #4a6cf7; border: 2px solid #cbd5e0; }
.bsa-action-btn.bsa-report:active { background: #dce4ff; }
@media (max-width: 768px) {
.bsa-container { margin: 5px; padding: 16px; }
.bsa-result-panel { margin-top: 16px; padding: 14px; }
.bsa-result-title { font-size: 16px; margin-bottom: 12px; }
.bsa-result-row { padding: 8px 0; }
.bsa-result-label, .bsa-result-value { font-size: 13px; }
.bsa-result-highlight-value { font-size: 32px; }
.bsa-result-highlight-unit { font-size: 18px; }
.bsa-action-btn { min-width: 85px; font-size: 12px; padding: 8px; }
.bsa-container h2 { font-size: 18px; }
.bsa-container p { font-size: 12px; margin-bottom: 10px; }
.bsa-methods { gap: 6px; margin-bottom: 12px; }
.bsa-method-btn { padding: 9px 6px; font-size: 12px; }
.bsa-input-group { margin-bottom: 10px; }
.bsa-label { font-size: 12px; margin-bottom: 5px; }
.bsa-uyari { font-size: 10px; padding: 8px 10px; margin-bottom: 10px; }
.bsa-button-group { flex-direction: column; gap: 8px; margin-top: 12px; }
.bsa-btn { padding: 12px; font-size: 14px; }
#bsa-notification { font-size: 13px; padding: 10px 16px; }
}
@media (max-width: 480px) {
.bsa-container { margin: 0; border-radius: 0; border-left: none; border-right: none; padding: 10px 8px; }
.bsa-container h2 { font-size: 17px; }
.bsa-container p { font-size: 11px; }
.bsa-methods { gap: 5px; margin-bottom: 10px; grid-template-columns: repeat(2, 1fr); }
.bsa-method-btn { padding: 8px 4px; font-size: 11px; }
.bsa-uyari { font-size: 10px; padding: 6px 8px; }
.bsa-input-group { margin-bottom: 8px; }
.bsa-label { font-size: 12px; }
.bsa-button-group { margin-top: 10px; gap: 6px; }
.bsa-btn { padding: 11px; font-size: 13px; }
}
@media (min-width: 769px) {
.bsa-methods { grid-template-columns: repeat(5, 1fr); }
.bsa-method-btn { font-size: 13px; padding: 11px 8px; }
}
@media (hover: none) and (pointer: coarse) {
.bsa-btn { min-height: 44px; }
}
</style>
<div id=”bsa-hesaplayici”>
<div id=”bsa-notification”></div>
<div class=”bsa-container”>
<h2 id=”bsaTitle”></h2>
<p id=”bsaDesc”></p>
<div class=”bsa-uyari” id=”bsaWarning”></div>
<!– Method Selection –>
<div class=”bsa-methods”>
<button class=”bsa-method-btn active” onclick=”bsa_selectMethod(‘dubois’)”>DuBois</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘mosteller’)”>Mosteller</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘haycock’)”>Haycock</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘gehan’)”>Gehan & George</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘boyd’)”>Boyd</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘fujimoto’)”>Fujimoto</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘takahira’)”>Takahira</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘shuter’)”>Shuter & Aslani</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘lipscombe’)”>Lipscombe</button>
<button class=”bsa-method-btn” onclick=”bsa_selectMethod(‘schlich’)”>Schlich</button>
</div>
<!– Gender (for Schlich method) –>
<div class=”bsa-input-group” id=”bsa-gender-group” style=”display:none;”>
<label class=”bsa-label” id=”bsaLblGender”></label>
<div class=”bsa-radio”>
<label><input type=”radio” name=”bsa_gender” value=”m” checked> <span id=”bsaLblMale”></span></label>
<label><input type=”radio” name=”bsa_gender” value=”f”> <span id=”bsaLblFemale”></span></label>
</div>
</div>
<!– Height –>
<div class=”bsa-input-group”>
<label class=”bsa-label” id=”bsaLblHeight”></label>
<div class=”bsa-units-wrapper”>
<input type=”number” inputmode=”decimal” class=”bsa-input” id=”bsa_height” placeholder=”170″ step=”0.1″>
<div class=”bsa-units”>
<button class=”active” onclick=”bsa_toggleUnit(‘bsa_height’,’cm’)”>cm</button>
<button onclick=”bsa_toggleUnit(‘bsa_height’,’in’)”>in</button>
</div>
</div>
</div>
<!– Weight –>
<div class=”bsa-input-group”>
<label class=”bsa-label” id=”bsaLblWeight”></label>
<div class=”bsa-units-wrapper”>
<input type=”number” inputmode=”decimal” class=”bsa-input” id=”bsa_weight” placeholder=”70″ step=”0.1″>
<div class=”bsa-units”>
<button class=”active” onclick=”bsa_toggleUnit(‘bsa_weight’,’kg’)”>kg</button>
<button onclick=”bsa_toggleUnit(‘bsa_weight’,’lb’)”>lb</button>
</div>
</div>
</div>
<div class=”bsa-button-group”>
<button class=”bsa-btn bsa-btn-primary” onclick=”bsa_hesapla()”>Hesapla</button>
<button class=”bsa-btn bsa-btn-secondary” onclick=”bsa_sifirla()”>Sıfırla</button>
</div>
<!– Results Panel –>
<div id=”bsaSonucPaneli” style=”display:none;” class=”bsa-result-panel”>
<div class=”bsa-result-title” id=”bsaResTitle”></div>
<div id=”bsaSonucDetay”></div>
</div>
</div>
</div>
<script>
(function() {
if (window.bsaHesaplayiciYuklendi) return;
window.bsaHesaplayiciYuklendi = true;
// ============================================
// VARSAYILAN DİL AYARI (DİL DEĞİŞTİRME)
// ‘tr’ = Türkçe, ‘en’ = English
// ============================================
let bsaLang = ‘en’;
let bsa_notificationTimeout;
let bsaMethod = ‘dubois’;
let bsaRes = null;
const bsaTrans = {
tr: {
title: ‘Vücut Yüzeyi Alanı Hesaplama (BSA)’,
desc: ‘Vücut yüzeyi alanınızı (BSA) boy ve kilo bilgilerinizle farklı formüllerle hesaplayın. Tıbbi ilaç dozajı ve kardiyolojide kullanılır.’,
warning: ‘BU ARAÇ TIBBİ BİLGİLENDİRME AMAÇLIDIR. İlaç dozajı için doktorunuza danışın.’,
gender: ‘Cinsiyet’,
male: ‘Erkek’,
female: ‘Kadın’,
height: ‘Boy’,
weight: ‘Kilo’,
calc: ‘Hesapla’,
reset: ‘Sıfırla’,
resultTitle: ‘BSA Hesaplama Sonuçları’,
bsa: ‘Vücut Yüzeyi Alanı (BSA)’,
bmi: ‘Vücut Kitle İndeksi (BMI)’,
method: ‘Hesaplama Yöntemi’,
allFormulas: ‘Tüm Formüller’,
fillAll: ‘Lütfen tüm alanları doldurun’,
copy: ‘Kopyala’,
share: ‘Paylaş’,
report: ‘Hata Bildir’,
print: ‘Yazdır’,
copied: ‘Kopyalandı!’,
// Methods
dubois: ‘DuBois Formülü’,
mosteller: ‘Mosteller Formülü’,
haycock: ‘Haycock Formülü’,
gehan: ‘Gehan & George Formülü’,
boyd: ‘Boyd Formülü’,
fujimoto: ‘Fujimoto Formülü’,
takahira: ‘Takahira Formülü’,
shuter: ‘Shuter & Aslani Formülü’,
lipscombe: ‘Lipscombe Formülü’,
schlich: ‘Schlich Formülü’
},
en: {
title: ‘Body Surface Area Calculator (BSA)’,
desc: ‘Calculate your body surface area (BSA) using different formulas based on height and weight. Used in medical drug dosing and cardiology.’,
warning: ‘THIS TOOL IS FOR MEDICAL INFORMATION PURPOSES. Consult your doctor for drug dosing.’,
gender: ‘Gender’,
male: ‘Male’,
female: ‘Female’,
height: ‘Height’,
weight: ‘Weight’,
calc: ‘Calculate’,
reset: ‘Reset’,
resultTitle: ‘BSA Calculation Results’,
bsa: ‘Body Surface Area (BSA)’,
bmi: ‘Body Mass Index (BMI)’,
method: ‘Calculation Method’,
allFormulas: ‘All Formulas’,
fillAll: ‘Please fill all fields’,
copy: ‘Copy’,
share: ‘Share’,
report: ‘Report Error’,
print: ‘Print’,
copied: ‘Copied!’,
// Methods
dubois: ‘DuBois Formula’,
mosteller: ‘Mosteller Formula’,
haycock: ‘Haycock Formula’,
gehan: ‘Gehan & George Formula’,
boyd: ‘Boyd Formula’,
fujimoto: ‘Fujimoto Formula’,
takahira: ‘Takahira Formula’,
shuter: ‘Shuter & Aslani Formula’,
lipscombe: ‘Lipscombe Formula’,
schlich: ‘Schlich Formula’
}
};
function bsa_showNotification(message) {
const notification = document.getElementById(‘bsa-notification’);
if (!notification) return;
notification.textContent = message;
notification.style.display = ‘block’;
clearTimeout(bsa_notificationTimeout);
bsa_notificationTimeout = setTimeout(() => {
notification.style.display = ‘none’;
}, 3000);
}
function bsa_updateLang() {
const t = bsaTrans[bsaLang];
const labelMap = {
‘bsaTitle’: t.title,
‘bsaDesc’: t.desc,
‘bsaWarning’: t.warning,
‘bsaLblGender’: t.gender,
‘bsaLblMale’: t.male,
‘bsaLblFemale’: t.female,
‘bsaLblHeight’: t.height,
‘bsaLblWeight’: t.weight
};
Object.entries(labelMap).forEach(([id, text]) => {
const el = document.getElementById(id);
if (el) el.textContent = text;
});
// Update buttons
document.querySelectorAll(‘.bsa-btn-primary’).forEach(b => b.textContent = t.calc);
document.querySelectorAll(‘.bsa-btn-secondary’).forEach(b => b.textContent = t.reset);
if (document.getElementById(‘bsaBtnCopy’)) {
document.getElementById(‘bsaBtnCopy’).textContent = t.copy;
document.getElementById(‘bsaBtnShare’).textContent = t.share;
document.getElementById(‘bsaBtnPrint’).textContent = t.print;
document.getElementById(‘bsaBtnReport’).textContent = t.report;
}
// Update results if visible
if (bsaRes) {
document.getElementById(‘bsaResTitle’).textContent = t.resultTitle;
bsa_showResult(bsaRes);
}
}
window.bsa_selectMethod = function(m) {
bsaMethod = m;
document.querySelectorAll(‘.bsa-method-btn’).forEach(b => b.classList.remove(‘active’));
event.target.classList.add(‘active’);
// Show gender field only for Schlich method
document.getElementById(‘bsa-gender-group’).style.display = m === ‘schlich’ ? ‘block’ : ‘none’;
}
window.bsa_toggleUnit = function(id, u) {
const inp = document.getElementById(id);
const btns = inp.parentElement.querySelectorAll(‘.bsa-units button’);
let v = parseFloat(inp.value);
btns.forEach(b => b.classList.remove(‘active’));
event.target.classList.add(‘active’);
if (!v) return;
const cu = inp.dataset.unit || ”;
if (id.includes(‘height’)) {
if (u == ‘cm’ && cu == ‘in’) v *= 2.54;
else if (u == ‘in’ && cu == ‘cm’) v /= 2.54;
} else if (id.includes(‘weight’)) {
if (u == ‘kg’ && cu == ‘lb’) v *= 0.453592;
else if (u == ‘lb’ && cu == ‘kg’) v /= 0.453592;
}
inp.value = v.toFixed(1);
inp.dataset.unit = u;
}
window.bsa_hesapla = function() {
const t = bsaTrans[bsaLang];
const hesaplaBtn = event.target;
const originalText = hesaplaBtn.textContent;
hesaplaBtn.textContent = bsaLang === ‘tr’ ? ‘Hesaplanıyor…’ : ‘Calculating…’;
hesaplaBtn.disabled = true;
hesaplaBtn.style.opacity = ‘0.7’;
const resetButton = () => {
hesaplaBtn.textContent = originalText;
hesaplaBtn.disabled = false;
hesaplaBtn.style.opacity = ‘1’;
};
setTimeout(() => {
try {
let h = parseFloat(document.getElementById(‘bsa_height’).value);
let w = parseFloat(document.getElementById(‘bsa_weight’).value);
if (!h || !w) {
bsa_showNotification(t.fillAll);
document.getElementById(‘bsaSonucPaneli’).style.display = ‘none’;
resetButton();
return;
}
// Convert to cm and kg
const hu = document.getElementById(‘bsa_height’).dataset.unit || ‘cm’;
const wu = document.getElementById(‘bsa_weight’).dataset.unit || ‘kg’;
if (hu === ‘in’) h *= 2.54;
if (wu === ‘lb’) w *= 0.453592;
// Calculate all BSA formulas
const gender = document.querySelector(‘input[name=”bsa_gender”]:checked’)?.value || ‘m’;
const allBSA = bsa_calculateAll(h, w, gender);
// Get selected method result
const selectedBSA = allBSA[bsaMethod];
// Calculate BMI
const hm = h / 100;
const bmi = w / (hm * hm);
bsaRes = {
bsa: selectedBSA,
bmi: bmi,
method: bsaMethod,
allBSA: allBSA,
height: h,
weight: w
};
bsa_showResult(bsaRes);
resetButton();
} catch (error) {
console.error(‘Hesaplama hatası:’, error);
bsa_showNotification(t.fillAll);
document.getElementById(‘bsaSonucPaneli’).style.display = ‘none’;
resetButton();
}
}, 300);
}
function bsa_calculateAll(h, w, gender) {
// All formulas use height in cm and weight in kg
return {
dubois: 0.007184 * Math.pow(w, 0.425) * Math.pow(h, 0.725),
mosteller: 0.016667 * Math.pow(w, 0.5) * Math.pow(h, 0.5),
haycock: 0.024265 * Math.pow(w, 0.5378) * Math.pow(h, 0.3964),
gehan: 0.0235 * Math.pow(w, 0.51456) * Math.pow(h, 0.42246),
boyd: 0.0333 * Math.pow(w, (0.6157 – 0.0188 * Math.log10(w))) * Math.pow(h, 0.3),
fujimoto: 0.008883 * Math.pow(w, 0.444) * Math.pow(h, 0.663),
takahira: 0.007241 * Math.pow(w, 0.425) * Math.pow(h, 0.725),
shuter: 0.00949 * Math.pow(w, 0.441) * Math.pow(h, 0.655),
lipscombe: 0.00878108 * Math.pow(w, 0.434972) * Math.pow(h, 0.67844),
schlich: gender === ‘f’
? 0.000975482 * Math.pow(w, 0.46) * Math.pow(h, 1.08)
: 0.000579479 * Math.pow(w, 0.38) * Math.pow(h, 1.24)
};
}
function bsa_showResult(r) {
const t = bsaTrans[bsaLang];
const methodName = t[r.method];
let details = `
<div class=”bsa-result-row”>
<span class=”bsa-result-label”>${t.method}:</span>
<span class=”bsa-result-value”>${methodName}</span>
</div>
<div class=”bsa-result-row”>
<span class=”bsa-result-label”>${t.bmi}:</span>
<span class=”bsa-result-value”>${r.bmi.toFixed(1)} kg/m²</span>
</div>
<div class=”bsa-result-highlight”>
<div class=”bsa-result-highlight-label”>${t.bsa}</div>
<div class=”bsa-result-highlight-value”>
${r.bsa.toFixed(4)}
<span class=”bsa-result-highlight-unit”>m²</span>
</div>
</div>
<div class=”bsa-formulas”>
<div style=”font-weight:700;color:#1a365d;margin-bottom:10px;font-size:14px;”>${t.allFormulas}:</div>
${Object.entries(r.allBSA).map(([key, val]) => `
<div class=”bsa-formula-item”>
<div class=”bsa-formula-name”>${t[key]}</div>
<div class=”bsa-formula-value”>${val.toFixed(4)} m²</div>
</div>
`).join(”)}
</div>
<div class=”bsa-actions”>
<button class=”bsa-action-btn” onclick=”bsa_copy()” id=”bsaBtnCopy”>${t.copy}</button>
<button class=”bsa-action-btn” onclick=”bsa_share()” id=”bsaBtnShare”>${t.share}</button>
<button class=”bsa-action-btn” onclick=”bsa_print()” id=”bsaBtnPrint”>${t.print}</button>
<button class=”bsa-action-btn bsa-report” onclick=”bsa_report()” id=”bsaBtnReport”>${t.report}</button>
</div>
`;
document.getElementById(‘bsaSonucDetay’).innerHTML = details;
document.getElementById(‘bsaSonucPaneli’).style.display = ‘block’;
document.getElementById(‘bsaResTitle’).textContent = t.resultTitle;
// Scroll to results
setTimeout(() => {
const sonucPanel = document.getElementById(‘bsaSonucPaneli’);
sonucPanel.scrollIntoView({ behavior: ‘smooth’, block: ‘start’ });
}, 150);
}
window.bsa_copy = function() {
const t = bsaTrans[bsaLang];
const methodName = t[bsaRes.method];
const txt = `${t.bsa}: ${bsaRes.bsa.toFixed(4)} m²\n${t.method}: ${methodName}\n${t.bmi}: ${bsaRes.bmi.toFixed(1)} kg/m²`;
navigator.clipboard.writeText(txt).then(() => bsa_showNotification(t.copied));
}
window.bsa_share = function() {
const t = bsaTrans[bsaLang];
const txt = `${t.bsa}: ${bsaRes.bsa.toFixed(4)} m²`;
if (navigator.share) {
navigator.share({ title: t.title, text: txt });
} else {
bsa_copy();
}
}
window.bsa_print = function() {
window.print();
}
window.bsa_report = function() {
const t = bsaTrans[bsaLang];
const methodName = t[bsaRes.method];
const subj = encodeURIComponent(t.title + ‘ – ‘ + t.report);
const body = encodeURIComponent(`${t.bsa}: ${bsaRes.bsa.toFixed(4)} m²\n${t.method}: ${methodName}\n${t.bmi}: ${bsaRes.bmi.toFixed(1)} kg/m²`);
window.location.href = `mailto:ve_you@hotmail.com?subject=${subj}&body=${body}`;
}
window.bsa_sifirla = function() {
// Clear inputs
document.getElementById(‘bsa_height’).value = ”;
document.getElementById(‘bsa_weight’).value = ”;
document.getElementById(‘bsa_height’).dataset.unit = ”;
document.getElementById(‘bsa_weight’).dataset.unit = ”;
// Reset unit buttons
document.querySelectorAll(‘.bsa-units button’).forEach((btn, idx) => {
if (idx === 0) btn.classList.add(‘active’);
else btn.classList.remove(‘active’);
});
// Reset method to DuBois
document.querySelectorAll(‘.bsa-method-btn’).forEach((btn, idx) => {
if (idx === 0) btn.classList.add(‘active’);
else btn.classList.remove(‘active’);
});
bsaMethod = ‘dubois’;
document.getElementById(‘bsa-gender-group’).style.display = ‘none’;
// Hide results
document.getElementById(‘bsaSonucPaneli’).style.display = ‘none’;
bsaRes = null;
}
// Enter key support
document.querySelectorAll(‘.bsa-input’).forEach(input => {
input.addEventListener(‘keypress’, function(e) {
if (e.key === ‘Enter’) {
e.preventDefault();
if (document.activeElement) document.activeElement.blur();
setTimeout(() => {
const calcBtn = document.querySelector(‘.bsa-btn-primary’);
if (calcBtn) calcBtn.click();
}, 100);
}
});
});
// Initialize language on page load
bsa_updateLang();
})();
</script>
<!– Custom HTML Shortcode sonu –>
