How to make a Phone Call with WRT
Article Metadata
With WRT you can get all contacts and send a SMS, but is it possible to make phone call instead of send a message? Yes, it's possible. You just need to use the tel protocol.
HTML Example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Phone Call</title>
<script type="text/javascript" language="javascript" src="phonecall.js">
<script type="text/javascript" language="javascript">
window.onload = function() {
call();
}
</script>
</head>
<body>
<ul>
<li id='telephone'>+559255555555</li>
</ul>
</body>
</html>
Javascript Code (phonecall.js)
function call() {
var doc = document;
var div = doc.getElementById('telephone');
var value= div.innerHTML;
widget.openURL("tel:"+value);
}
Suggestion
If you want improve this example, you can get all contact from your device, shows in the page and add click event to do the phone call.


the widget.openURL method opens a blank page and it appears on top of the widget. I prefer using <a href="tel:xxxxxxxx">Contact</a> to make a call. --Jiri.popek 10:50, 3 November 2009 (UTC)