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)

Does anyone have any idea?

Only seeing a small code section and not 100% sure what you are asking but do you need to put the input inside a form?
Have you considered making it a button and the number the button label then using the actions attached to the button?

@Hyperbytes , you can download phone js the see my codes

I want to bind caller phone number to input field then trigger server connect or app connect actions …

I see the caller number in input field and input value but I cant trigger any server actions / app connect actions

Where is wrong and what is right way I dont know …

Surely you will need to wrap the input field in a form to trigger server actions?

Please check this topic, as the same has been discussed there: Jquery Function in Dynamic Events

2 Likes