This form requires 2 variables that can be sent via the get method, which are: phone, and account. ext is an optional get variable.
Code for Sample HTML Form
A sample HTML form would look like this:
<form method="get" action="https://ivlrest.voiceelements.com/clickcall"> <input type="text" id="phone" name="phone" /> <input type="text" id="ext" name="ext" /> <input type="hidden" id="account" name="account" value="100" /> <input type="submit" id="submit" value="submit" /> </form>
NOTE: The client’s web designer should replace the value 100 in the hidden field account with the account number that they are given.
Additional Notes:
The web designer should verify that only numbers are passed in both the phone and ext text boxes to avoid potential errors.
This can be done via javascript by including the following function in the head section:
<head> <script type="text/javascript"> function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } </script> </head>
And adding the following property to the phone textbox:
<input id="phone" name="phone" onkeypress="return isNumberKey(event)" />
Server Side Languages
Using a server side language, such as ASP.NET or PHP, the designer could use separate text boxes to make the form more user friendly.