mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
65 lines
2.6 KiB
HTML
65 lines
2.6 KiB
HTML
<!--
|
|
|
|
Copyright (C) 2011 by Daniel Shookowsky
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="jquery-1.6.min.js" type= "text/javascript"/>
|
|
<script src="jquery.mobile-1.0b3.min.js" type="text/javascript"/>
|
|
<script src="phonegap-1.0.0.js" type="text/javascript"/>
|
|
<Script src="smsplugin.js" type="text/javascript" />
|
|
<script type="text/javascript">
|
|
function onDeviceReady () {
|
|
$('#send').bind('click', function () {
|
|
alert('Phone: ' + $('#phone').val() + ' Message: ' + $('#message').val());
|
|
window.plugins.sms.send($('#phone').val(),
|
|
$('#message').val(),
|
|
function () {
|
|
alert('Message sent successfully');
|
|
},
|
|
function (e) {
|
|
alert('Message Failed:' + e);
|
|
}
|
|
);
|
|
});
|
|
}
|
|
document.addEventListener("deviceready", onDeviceReady, false);
|
|
</script>
|
|
<link rel="stylesheet" type="text/css" href= "jquery.mobile-1.0b3.min.css">
|
|
<meta name="viewport" content= "width=device-width; height=device-height; user-scalable=no">
|
|
</head>
|
|
<body>
|
|
<div id="startPage" data-role="page" data-theme="a">
|
|
<div data-role="header">
|
|
<h1>SMS Demo</h1>
|
|
</div>
|
|
<div data-role="content">
|
|
<label for="phone">Recipient Number:</label>
|
|
<input type="tel" id="phone" name="phone" placeholder="SMS Number"/>
|
|
<label for="message">Message:</label>
|
|
<textarea id="message" name="message"></textarea>
|
|
<a href="#" id="send" data-role="button">Send</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |