Plantronics + Polycom. Now together as Poly Logo

Simulate hyperlink click event when pressing keypad button on Polycom VVX

SOLVED
Highlighted
Occasional Advisor

Simulate hyperlink click event when pressing keypad button on Polycom VVX

I'm developing an application for the VVX 2xx/3xx/4xx phones with at least the firmware 5.6.1.

This application displays a list of contacts. Each contact is an hyperlink with a target configured with a tel URI:

<a id="record1" href="tel:120">1</a>

When the user selects the hyperlink the phone prompts the user to dial the number (here it's 120).

 

Instead of selecting the hyperlink using the navigation button, I'm trying to simulate the click on a specific hyperlink when the user press a key on the phone's keypad.

So if the user press the key "1", the event is processed by the javascript and trigger a click on the hyperlink. This is not working.
I've made some tests which show the key press event is properly processed, that the hyperlink's id is properly found but the javascript function "click()" on such hyperlink doesn't seem to work.

 

Here is a simplified version of the application:

​<html>
<head>
<title>Directory</title>
<script type="text/javascript">

    PolySoftKey.resetAllDefaults();
    document.onkeyup = KeyCheck;
    function KeyCheck(e) {
        var keyID = (window.event) ? event.keyCode : e.keyCode;
        if (keyID > 47 && keyID < 58) {
            var id = (keyID == 48) ? 0 : keyID - 48;
            var recordID = "record" + id;
            //The following click() doesn't trigger the display the tel URI nor the softkeys to call the number or cancel this prompting (ie it doesn't trigger the second picture).
            document.getElementById(recordID).click();
        }
    }
</script>
</head>
<body onload="onInit()">
<table border="0">
  <tr><td align="right"><a id="record1" href="tel:120">1</a></td><td>Oliver</td><td>120</td></tr>
  <tr><td align="right"><a id="record2" href="tel:121">1</a></td><td>Clara</td><td>121</td></tr>
  <tr><td align="right"><a id="record3" href="tel:122">1</a></td><td>John</td><td>122</td></tr>
</table>
</body>
</html>

Is this a known limitation ?

Is there another way to prompt the user to dial the contact's number (the Polycom doesn't dial immediately the number on the key press event, but it only display that the number can be dialed) ?

 

Thanks

Message 1 of 3
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Advisor

Re: Simulate hyperlink click event when pressing keypad button on Polycom VVX

Hi Steffen,

 

Thanks for the link, I should have posted this question into the "Polycom Endpoints Forum" as you mentioned.

I didn't find a similar issue.
The hyperlink is working fine, but the HTML5/javascript which simulate the click is not.

The "window.location" is working fine on HTTP hyperlink only, it cannot be used for audio nor tel URI.

 

But I find out I can use the PolyUri.pushUri to trigger the same behavior as the click on the hyperlink with this useful post >>here<<

<script type="text/javascript">

    PolySoftKey.resetAllDefaults();
    document.onkeyup = KeyCheck;
    function KeyCheck(e) {
        var keyID = (window.event) ? event.keyCode : e.keyCode;
        if (keyID > 47 && keyID < 58) {
            var id = (keyID == 48) ? 0 : keyID - 48;
            var recordID = "record" + id;
            //The following click() doesn't trigger the display the tel URI nor the softkeys to call the number or cancel this prompting (ie it doesn't trigger the second picture).
            var number = "tel://"+ ....
            PolyUri.pushUri(number);
        }
    }
</script>

View solution in original post

Message 3 of 3
2 REPLIES 2
Highlighted
Polycom Employee & Community Manager

Re: Simulate hyperlink click event when pressing keypad button on Polycom VVX

Hello @lbonis,

welcome to the Polycom Community.

There are certain limitations but I suggest you search for other posts => here <=


Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.

Best Regards

Steffen Baier

Polycom Global Services

----------------
The title Polycom Employee & Community Manager is a community setting and does not reflect my role. I am just a simple volunteer in the community like everybody else. My official "day" Job is 3rd Level support at Poly but I am unable to provide official support via the community.

----------------

Notice: This community forum is not an official Poly support resource, thus responses from Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge. If you need immediate and/or official assistance please open a service ticket through your proper support channels.
Please also ensure you always check the VoIP , Video Endpoint , Skype for Business , PSTN or RPM FAQ's
Message 2 of 3
Highlighted
Occasional Advisor

Re: Simulate hyperlink click event when pressing keypad button on Polycom VVX

Hi Steffen,

 

Thanks for the link, I should have posted this question into the "Polycom Endpoints Forum" as you mentioned.

I didn't find a similar issue.
The hyperlink is working fine, but the HTML5/javascript which simulate the click is not.

The "window.location" is working fine on HTTP hyperlink only, it cannot be used for audio nor tel URI.

 

But I find out I can use the PolyUri.pushUri to trigger the same behavior as the click on the hyperlink with this useful post >>here<<

<script type="text/javascript">

    PolySoftKey.resetAllDefaults();
    document.onkeyup = KeyCheck;
    function KeyCheck(e) {
        var keyID = (window.event) ? event.keyCode : e.keyCode;
        if (keyID > 47 && keyID < 58) {
            var id = (keyID == 48) ? 0 : keyID - 48;
            var recordID = "record" + id;
            //The following click() doesn't trigger the display the tel URI nor the softkeys to call the number or cancel this prompting (ie it doesn't trigger the second picture).
            var number = "tel://"+ ....
            PolyUri.pushUri(number);
        }
    }
</script>

View solution in original post

Message 3 of 3