Advertisement
Varun_Krishna

Compose message with Alert functionality.js

Mar 26th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var composeMessage = {
  2.     create: function() {
  3.         alert("you have clicked the compose message button");
  4.         window.location="composeMessage.html";
  5.     },
  6.     send:function (){      
  7.         /*var message = "mailto:"+ escape(document.getElementById('inputTo').value)
  8.                         + "?cc=varun@abc.com"
  9.                         + "&subject=" + escape("This is my test mail")
  10.                         + "&body=" + escape(document.getElementById('textArea1').value)
  11.                         window.location.href = message;*/
  12.        /* window.plugin.email.open({
  13.             to:      ['senthilkumar@abc.com'],
  14.             cc:      ['varun@abc.com'],
  15.             //bcc:     ['john.doe@appplant.com', 'jane.doe@appplant.com'],
  16.             subject: 'Test Mail with attachments',
  17.             body:    'How are you?Nice greetings from the Me.',
  18.             attachments: [
  19.                 //'relative:/HelloWorld/www/res/icon/android/icon-36-ldpi.png'
  20.                 'relative://HelloWorld/res/drawable/icon.png'              
  21.             ]      
  22.         });*/
  23.         alert("Before the navigator.notification.alert");
  24.         navigator.notification.alert("Mail Successsfully Sent!",dismissAlert,"Mail Sent","OK");    
  25.         //window.plugin.email.open();
  26.         alert("Message Successfully sent!");
  27.     },
  28.     dismissAlert: function () {
  29.     },
  30.     reset: function() {
  31.         alert("Are you sure you want to clear the fields?");
  32.         document.getElementById("inputTo").value="";
  33.         document.getElementById("textArea1").value="";
  34.     }
  35. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement