Results 1 to 2 of 2

Thread: How to send data to another page on buttonclick

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default How to send data to another page on buttonclick

    I have created a grid , and also have a button . I want to send this grid data to another page so that i can access from there on clicking the button .

    my full code is this

    Code:
    Ext.onReady(function() {
    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name', 'email', 'phone'],
        data:{'items':[
            {"name":"Lisa", "email":"[email protected]", "phone":"555-111-1224"},
            {"name":"Bart", "email":"[email protected]", "phone":"555--222-1234"},
            {"name":"Homer", "email":"[email protected]", "phone":"555-222-1244"},
            {"name":"Marge", "email":"[email protected]", "phone":"555-222-1254"}
        ]},
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });
    
    
    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [
            {header: 'Name',  dataIndex: 'name', editor: 'textfield'},
            {header: 'Email', dataIndex: 'email', flex:1,
                editor: {
                    xtype: 'textfield',
                    allowBlank: false
                }
            },
            {header: 'Phone', dataIndex: 'phone'}
        ],
        selType: 'cellmodel',
        plugins: [
            Ext.create('Ext.grid.plugin.CellEditing', {
                clicksToEdit: 1
            })
        ],
        height: 600,
        width: 600,
        renderTo: Ext.getBody()
    });
    Ext.create('Ext.Button', {
        text: 'Click me',
        renderTo: Ext.getBody(),
        handler: function() {
          window.open("prac.html?a="+store, "_self")
        }
    });
    
    
    });

  2. #2
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    387
    Answers
    12
    Vote Rating
    12
      0  

    Default

    Hi there,

    If i understand your coding, it appears you'd like to be able to pass (in concept) a store to another webpage/sencha application ?

    I'm not entirely sure why you would want to do it that way. Sencha apps are all single page applications which can easily accommodate multitple screens just by using some of our components (such as card panels, tabs, etc).

    Could you elaborate your end goal here ?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •