Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8283575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:46:44+00:00 2026-06-08T10:46:44+00:00

Button Click of my Android App using Sencha Touch 2 is working fine in

  • 0

Button Click of my Android App using Sencha Touch 2 is working fine in Android 2.3 emulator but not working properly in Android 3.0 and above.When I am running this app in Android 3.0 and above and click Save button it doesn’t compile from var isValid = true; line. My code is as follows:-

{
            xtype: 'button',
            text: 'Save',
         handler: function(){
         //var val3 = Ext.ComponentQuery.query('#na')[0].getValue(); 
         val3 = Ext.getCmp('na').getValue();
         console.log(val3);
         val = Ext.getCmp('ea').getValue();          
         console.log(val);
         val4 = val.indexOf("@");
         console.log(val4);
         val5 = val.lastIndexOf(".");
         console.log(val5);
         val2 = Ext.getCmp('pa').getValue();
         console.log(val2); 
         val1 = Ext.getCmp('ra').getValue();    
         console.log(val1); 
            var isValid = true;
            Ext.Msg.alert("Info", "123");
            var errors = new Array();
            Ext.Msg.alert("Info", "456");
           //validate the name                        
            if (val3.search(/[0-9]/) > -1) {
            Ext.Msg.alert("Info", "789");
              isValid = false;
              errors.push({field : 'name',
              reason : 'Name must not contain numbers'});
                }
             if (val3.length <= 0) {

              isValid = false;
              errors.push({field : 'name',
              reason : 'Name should not be blank'});
                }

                if (val3.search(/[@]/) > -1) {
              isValid = false;
              errors.push({field : 'name',
              reason : 'Name must not contain special characters'});
                }
             //validate e-mail                        
              if (val4<1 || val5<val4+2 || val5+2>=val.length)
             {
             isValid = false;
                errors.push({field : 'email',
                reason : 'Invalid email id'});
             }
            if (val.search("/^([a-zA-Z0-9_\.\-])+(@[a-z])+([.][a-z])+$+") > -1){
                isValid = false;
                errors.push({field : 'email',
                reason : 'Invalid Email address'});
              }
            if (val.length <= 0){
                isValid = false;
                errors.push({field : 'email',
                reason : 'Email address should not be blank'});
              }                   
            //validate Password                        
            if (val1 != val2) {
                isValid = false;
                errors.push({field : 'reenter',
                reason : 'Password do not match'});
                 } 
            if(val2 <= 0){
               isValid = false;
               errors.push({field : 'password',
               reason : 'Password should not be blank'});
                 }  
            if(val1 <= 0){
               isValid = false;
               errors.push({field : 'reenter',
               reason : 'Re-enter Password should not be blank'});
                 }  
            if(val1.length > 4){
               isValid = false;
               errors.push({field : 'reenter',
               reason : 'Re-enter Password should not be more than 4 characters'});
               }  
            if(val2.length > 4){
               isValid = false;
               errors.push({field : 'password',
               reason : 'Password should not be more than 4 characters'});
              }  
            //show error if the validation failed                        
            if (!isValid) {
               var errStr = "";
               Ext.each(errors, function(error, index){
               errStr += "[" + (index+1) + "] - " + error.reason + "\n";
               });
               Ext.Msg.alert("Error", errStr);
              } else {//form is valid
                //form.submit();
                Ext.Msg.alert("Info", "Success");
               }
             }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:46:47+00:00Added an answer on June 8, 2026 at 10:46 am

    I hate to be the one to break the news to you, but Sencha Touch 2 does not support Android 3.x. Only 2.x and 4.x. A quick forum discussion can be found here:

    http://www.sencha.com/forum/showthread.php?186178-Phonegap-1.5-Sencha-Touch-2-has-problems-on-android-3.0

    Your syntax looks fine though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have integrated the PayPal in to my Android App. But as i click
I am beginner in android. When i click a Button KILL selected apps to
I created a Search Interface in Android. when we click on hardware search button
I am working on an Android app that has multiple screens the user will
I am using Eclipse and created HelloWorld and it works fine using emulator. Then
I have a web app (sencha/phonegap) that includes a feature allowing users to click
I am trying to set transparent panel using this tutorial in my app but
I am trying to automate android app(Relocation services)using robotium. In this app there are
I'm rather new to Android and I'm working on an app that is registered
I using below code to insert new sms in inbox, but when i click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.