Root cause: innerHTML does not execute <script> tags in modern browsers. The _analysis.html and polling.html fragments had inline <script> blocks that were silently dropped, causing: - Confirm form's submitJob() undefined → form submitted as normal GET back to '/' (user saw 'New Conversion Session' instead of polling) - Polling page's poll() never started → stuck on 'Waiting for backend...' Fix: - Stripped all <script> tags from _analysis.html and polling.html - Moved all JS logic into index.html (executed on page load) - initConfirmForm() attaches submit/change listeners after analysis HTML is injected via innerHTML - initPolling() attaches poll timer + reuse button handlers after polling fragment is injected - Polling fragment replaces step1/analysis content while keeping base.html header/footer intact - Reuse buttons now use onclick attached via JS (not inline) |
||
|---|---|---|
| .. | ||
| _analysis.html | ||
| base.html | ||
| index.html | ||
| polling.html | ||