Spaces:
Sleeping
Sleeping
File size: 1,696 Bytes
3ae709f f449bff 3ae709f f449bff 3ae709f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Streamlit Component</title>
</head>
<body>
<script>
function clickAskButton() {
let askButton = document.querySelector('button[data-baseweb="button"]');
if (!askButton) {
askButton = document.querySelector('button:contains("Ask")');
}
if (askButton) {
askButton.click();
} else {
console.error('Ask button not found');
}
}
function setupClickHandlers() {
document.getElementById('question1').onclick = function() {
console.log('Question 1 clicked');
document.querySelectorAll('div.stTextInput input')[0].value = 'Was genau ist ein Belegarzt?';
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
clickAskButton();
};
document.getElementById('question2').onclick = function() {
console.log('Question 2 clicked');
document.querySelectorAll('div.stTextInput input')[0].value = 'Wofür wird die Alpha-ID verwendet?';
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
clickAskButton();
};
document.getElementById('question3').onclick = function() {
console.log('Question 3 clicked');
document.querySelectorAll('div.stTextInput input')[0].value = 'Was sind die Vorteile des ambulanten operierens?';
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
clickAskButton();
};
};
window.onload = function() {
setTimeout(setupClickHandlers, 3000);
};
</script>
</body>
</html>
|