I am currently utilizing the following JavaScript function for a link on the homepage. The requirement is for the link to be automatically clicked upon page load.
Link-
document.writeln("<a href=\"javascript: live_chat_link(m_sTicketType,1);\" class=emp onmouseover='window.status = \"Live Chat\"; return true;' onmouseout=\"window.status = window.defaultStatus; return true;\">Live Chat</a>");
I have attempted steps such as adding
document.getElementById('zautoclick').click();
and adding id="zautoclick"
before href
, but I am facing an issue where the link does not display on my page nor does it load the second page that should appear after clicking on Live Chat.
If possible, please provide some guidance on how to implement auto click functionality in my specific scenario.