I have a large form that is often used but takes 2-3 seconds to load. To get around this, I have it loaded by clicking the <a id="doc_ready_link" class="use-ajax" link with JS on page load.
document.querySelector('#doc_ready_link').click(); On faster machines like my laptop or phone, this is fine and I have a fast page load and a spinner on the form link.
But on slower laptops and phones, other JS stuff like the menu doesn't work until it's loaded giving a bad UX.
How do I get that form loaded with ajax after page load without locking up the browser?
Thanks.