Returns a form to make a click to call from the number inserted in the form to the forwarding number attached to the link id passed as parameter.

The following parameters can be sent in the data object. One or more parameters must be sent

ParameterDescriptionDefault ValueData TypeMandatory
tpl

Specifies the Form Template you want to use

Default templates in English, French and Spanish are : default_en, default_fr, default_es

 STRINGYES
lidSpecifies the link ID of the link we will forward the call to STRINGYES
debugtrue if you want to see the possible errors when integrating in the platform. False if notFALSEBOOLEANNO

Example Javascript executed in the page

- In this example the javascript will be executed at the same time that the page. - This is searching for Template Name  "form_en" to make a call to the forwarding of the  Link ID  555555. Debug mode is active so if there are any problems it will return the error messages which caused. Ones Debug Mode is false there will not be any error messages to return. - It will show the form to make the click to call  in the elemet matched by id. In this case click to call. See our General Parameters  page for more information on VoxReq.resp

<script type="text/javascript">
       var VoxReq = {}
       VoxReq.auth:{
                    "accK":"b59b5cd281",    //Access Key
                    "actK":"ffb2b8d326bb3d8e0f377649a4ac76a1ce8a8f84"}, //Action Key
       VoxReq.data:{
                    "tpl":"form_en",      //Template ID
                    "lid":"555555",       //Link ID
                    "debug":"true"},      //Display error messages to help to integrate Javascripts (Auth errors, wrong parameters etc).Optional
       VoxReq.resp:{"elementsBy":{"match":"id","element":"clicktocall"}}};

       (function() {
                var vox = document.createElement('script'); vox.type = 'text/javascript';
                vox.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'www.voxanalytics.com/js/api/vox.js';
                var s = document.getElementsByTagName('script')0; s.parentNode.insertBefore(vox, s);
       })();
 </script>

Result

Success Result

<script type="text/javascript" type="text/javascript" src="//www.voxanalytics.com/js/api/index.php?a={"www":"sandbox","accK":"b59b5cd281","actK":"ffb2b8d326bb3d8e0f377649a4ac76a1ce8a8f84"}&r={"elementsBy":{"match":"id","element":"clicktocall"}}&d={"tpl":"template_name","lid":"link_id 1","debug":"true"}" id="iovoxCall"></script>

Failure Result - i.e. no matching template

Example Javascript on a pop up window

- The javascript will open another window where the form will appear. - This is searching for Template Name  "form_en" to make a call to the forwarding of the  Link ID  555555. Debug mode is active so if there are any problems it will return the error messages which caused. Ones Debug Mode is false there will not be any error messages to return.

window.open('/js/api/index.php?accK=b59b5cd281&actK=ffb2b8d326bb3d8e0f377649a4ac76a1ce8a8f84&tpl=form_en&li=555555&t=1350287911', 'ClickToCall', 'left=200,top=200,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes,height=350,width=300');

| Url parameter ** | **description | | --- | --- | | acck | Access Key | | actk | Action Key | | tpl | Template Name the template name we want to use | | li | Link Id of the link we want to call |