How can I use returned javascript result to app connect variable

I’m creating agent console (for callcenter). Agents call anywhere and can talk via web browser (Voip)
But I want to open modal and show caller info (all caller number stored in database) … I want to query caller number …
My problem ;

I cant bind to caller number into hidden field ? How can I bind it ?
peername is caller number

I tried ;
document.getElementById(‘arayanno_inp’).setAttribute(‘value’,peername);
document.getElementById(‘arayanno_inp’).value = peername ;
Result ;

I see caller numbers but I cant trigger the some app connect functions . forexample load query or open notifications … all variables are null

I need your help&guide

my javascript file … (you can see my rows 80-81 and 140-141 )
phone.zip (1.8 KB)

Community Page
Last updated: