4
Answers

Windows Phone 8.1 - Auto Filling OTP received by SMS message

Hi All,
 
We are trying to fill automatically an  OTP(one time password) textbox and OTP is receiving by a SMS. 
So my problem is - how to read a SMS and fill OTP textbox automatically? 
 

Answers (4)

1
Photo of Raja T
NA 7.4k 6k 9y
Hello Payal , Refer below code
 
 
<script type="text/javascript" language="javascript"> 
function isGreater(date)
{ 
   if(this.getTime() > date.getTime())
   { 
      return true;
    } 
   else
   {    return false;
    }
 } 

Date.prototype.IsGreater = isGreater; //dd/MM/yyyy 
// Clearly instantiate a Date object with params as per your textboxes 
var dateOne = new Date();  
 dateOne.setFullYear(2001,12,31); // 31st December 2001 
var dateTwo = new Date(); 
 dateTwo.setFullYear(2002,1,1); // 1st Jan 2002     
 alert("Date Two is greater : " + dateTwo.IsGreater(dateOne));
 alert("Date One is greater : " + dateOne.IsGreater(dateTwo)); //I would use a custom validator with a function based on the above. 

</script>

Please refer below links 

http://stackoverflow.com/questions/7335075/compare-2-dates-in-format-dd-mm-yyyy-with-javascript-jquery
https://bytes.com/topic/javascript/answers/485296-dd-mm-yyyy-date-compare-problem
http://forums.asp.net/t/1096556.aspx

 
0
Photo of Payal Banerjee
NA 11 345 9y
thnk u for resolution. But I have mentioned issue in your reply.Plz check and let me know , if u can help ....
0
Photo of Payal Banerjee
NA 11 345 9y
thnk u for resolution. But I have mentioned issue in your reply.Plz check and let me know , if u can help ....
0
Photo of Payal Banerjee
NA 11 345 9y
thnk u for resolution. But I have mentioned issue in your reply.Plz check and let me know , if u can help ....
0
Photo of Payal Banerjee
NA 11 345 9y
Thank you so much for the fast resolution.
Actually , what I am looking for is : to compare current date=Today with aSharepoint list 's first item's Modified date.
 
So, I am not able to read that Sharepoint list's first item 's Modified date. 
So I want to add that if condition :
Current date == Modified date of 1st item in sharepoint list
then if condition fails
{
 
update list with :
 
listItemEnumerator1 = collListItems1.getEnumerator();
itemCountList = collListItems1.get_count();
while (listItemEnumerator1.moveNext()) {
oListItem1 = listItemEnumerator1.get_current();
oListItem1.update();
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));