Set focus automatically on textarea at session start
Articles related to customization are written for a technical audience who have experience in web development. Knowledge of HTML, CSS, and JavaScript are required.
You can learn from this article how to set focus automatically on Textarea at session start.
File to edit: LanguagesForChatOnlyMode.js
var ic_hic_demo_timer1 = null;
var ic_hic_demo_timer2 = null;
ic_hic_demo_timer1 = setInterval(ic_hic_demo_timer_checkobject1, 100);
function ic_hic_demo_timer_checkobject1()
{
if ((ICObject != null) && (ICObject.pChatText != null))
{
clearInterval(ic_hic_demo_timer1);
ICObject.pChatText.onfocus = function()
{
clearInterval(ic_hic_demo_timer2);
ICObject.pChatText.onmousedown();
}
ic_hic_demo_timer2 = setInterval(ic_hic_demo_timer_checkobject2, 100);
}
}
function ic_hic_demo_timer_checkobject2()
{
try
{
ICObject.pChatText.focus();
}
catch (ex) {}
}
Article last updated: 27 September, 2022
You are viewing the latest version of this article.