1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    4
    Vote Rating
    0
    SagisJung is on a distinguished road

      0  

    Default How to show a simple form on home page of Sencha App??

    How to show a simple form on home page of Sencha App??


    Dear Everybody!!
    I am a beginner to use Sencha Touch for app development..
    And i tried to make a sample app first.
    And I followed the tutorials taught by the learning center.
    Following are the steps what i did..

    First point is that I am using wamp localhost server on desktop for testing html file that would contain the application javascript file named 'index.js' under 'src' subdirectory of app root directory.

    And index.html is coded like this;

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>DatingWorld</title>

    <!-- Sencha Touch CSS -->
    <link rel="stylesheet" href="resources/css/sencha-touch.css" type="text/css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="css/style.css" type="text/css">

    <!-- Google Maps JS -->
    <!--<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>-->

    <!-- Sencha Touch JS -->
    <script type="text/javascript" src="sencha-touch-debug.js"></script>

    <!-- Application JS -->
    <script type="text/javascript" src="index.js"></script>


    </head>
    <body></body>
    </html>


    And index.js is coded like this;

    Ext.setup({
    icon: 'icon.png',
    tabletStartupScreen: 'tablet_startup.png',
    phoneStartupScreen: 'phone_startup.png',
    glossOnIcon: false,
    onReady: function() {

    var form = new Ext.form.FormPanel({
    items: [
    {
    xtype: 'textfield',
    name : 'first',
    label: 'First name'
    },
    {
    xtype: 'textfield',
    name : 'last',
    label: 'Last name'
    },
    {
    xtype: 'numberfield',
    name : 'age',
    label: 'Age'
    }
    ]
    });
    Ext.regModel('User', {
    fields: [
    {name: 'first', type: 'string'},
    {name: 'last', type: 'string'},
    {name: 'age', type: 'int'}
    ]
    });

    var user = Ext.ModelMgr.create({
    first: 'Ed',
    last : 'Spencer',
    age : 24
    }, 'User');

    form.load(user);
    form.show();
    }
    });


    and when i tried to display 'index.html' by using url 'http://localhost/datingapp/index.html' (datingapp is the root directory for my sample app), nothing is displayed on the page and only white screen..
    I am at a loss how to get around with it..
    Please help me!!
    Looking forward to help from all of you..
    Thanks in advance.

    Sincerely.
    Sagis.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
    tryanDLS is on a distinguished road

      0  

    Default


    Please don't post in multiple forums. Also read http://sencha.com/learn/Ext_Forum_He..._code_properly

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    3
    Vote Rating
    0
    snelweg is on a distinguished road

      0  

    Default


    Quote Originally Posted by tryanDLS View Post
    Please don't post in multiple forums. Also read http://sencha.com/learn/Ext_Forum_He..._code_properly
    what a completely ty answer. If you want to behave like a dick do not post here!
    Either help or shutup!

Similar Threads

  1. how to navigate from login page to home page in gxt
    By venu in forum Ext GWT: Help & Discussion (1.x)
    Replies: 8
    Last Post: 29 Jun 2010, 1:46 AM
  2. extjs.com home page widget
    By donalconlon in forum Community Discussion
    Replies: 4
    Last Post: 3 Jun 2008, 12:30 AM
  3. home page...paging component
    By kaizen-labz in forum Community Discussion
    Replies: 0
    Last Post: 11 Oct 2007, 10:18 PM
  4. NEWS: Google finally ajaxifies their home page
    By jay@moduscreate.com in forum Community Discussion
    Replies: 0
    Last Post: 26 May 2007, 2:28 PM

Thread Participants: 2

Tags for this Thread