Spaces:
Sleeping
Sleeping
| <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> | |