Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

How to set Focus on BTF Editor by code

$
0
0

Hi Experts,

 

i try to set the focus on the btf editor in our incident by code, so that the agent can enter text without a click.

 

Other UI-Elements have a p-Getter or the UI-Element Attribute Focus, but thtmlbx:btf not.

 

My next idea was JScript:

<SCRIPT FOR=window event=onload language="JScript">

function setFocus()
    {    var focusField = "BTFEditor_IFrame_" + "<%= controller->component_id%>" + "_" + "<%= controller->gc_btfeditor_id%>";    alert("Focus before: " + document.activeElement.getAttribute('id') + " in: " + focusField );    var object     = document.getElementById(focusField);    object.focus( );     }
window.setTimeout(setFocus,  4000 );</SCRIPT>

Without success.

 

If i set the focus manual by clicking the alert show ( document.activeElement.getAttribute('id') ) , that the id is correct.

 

Any ideas?

 

Regards

Tobias


Viewing all articles
Browse latest Browse all 4552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>