Results 1 to 2 of 2

Thread: how can i sent value from extjs to php

  1. #1

    Question how can i sent value from extjs to php

    hi i search lot but but i coulnd find any way to see how wh can sent value to php or post value in extjs i usr this code pelz answr me ....


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <head>
    <title>test page</title>
    <link rel="stylesheet" type="text/css" href="ext-all.css"/>
    <script type="text/javascript" src="adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="ext-all.js"></script>
    <style type="text/css">
    body{
    margin:0;padding:0;
    font-family:Tahoma; font-size:14px;
    }
    select, input {
    font-family:Tahoma;
    }
    .style1 {
    font-size: 16px;
    font-weight: bold;
    }
    </style>
    </head>
    <script>
    Ext.onReady(function() {
    var form = new Ext.form.FormPanel({
    baseCls: 'x-plain',
    layout:'absolute',
    renderTo: document.body,
    url:'form1.php',
    defaultType: 'textfield',
    items: [
    {
    x: 375,
    y: 65,
    xtype:'label',
    text: ': tel'
    },{
    x: 240,
    y: 60,
    name: 'tel',
    anchor:'85%', // anchor width by percentage
    },
    {
    x: 365,
    y: 6,
    xtype:'label',
    text: ': filmname '
    },{
    x: 200,
    y: 7,
    name: 'scollname',
    anchor:'80%', // anchor width by percentage
    },
    {
    x: 190,
    y: 95,
    xtype:'label',
    text: ' :fax'
    },{
    x: 50,
    y: 90,
    name: 'fax',
    anchor: '40%' // anchor width by percentage
    },{
    x: 375,
    y: 95,
    xtype:'label',
    text: ' :e-mail'
    },{
    x: 240,
    y: 90,
    name: 'email',
    anchor: '85%' // anchor width by percentage
    },{
    x: 355,
    y: 125,
    xtype:'label',
    text: ' :aboutfilm'
    },{
    x: 200,
    y: 120,
    name: 'about',
    anchor: '80%', // anchor width by percentage
    },
    {
    x: 355,
    y: 155,
    xtype:'label',
    text: ' :morefilm'
    },{
    x: 200,
    y: 150,
    name: 'shoar',
    anchor: '80%' // anchor width by percentage
    }
    ]
    });
    var window = new Ext.Window({
    title: 'moreex',
    resize:false,
    width: 450,
    height:300,
    closable: false,
    resizable: false,
    minWidth: 450,
    minHeight: 300,
    layout: 'fit',
    plain:true,
    bodyStyle:'padding:5px;',
    buttonAlign:'center',
    items: form,
    buttons: [{
    text: 'send',
    handler:function(){Ext.MessageBox.show({
    title: 'ok ',
    icon: Ext.MessageBox.INFO,
    msg: 'data has sent',
    buttons: Ext.MessageBox.OK,

    })},
    }, {
    text: 'reset',
    handler: function(){
    form.getForm().reset();
    }
    }]
    });
    window.show();
    });
    </script>
    <body>
    <?php $tel1=$_REQUEST['tel1'];
    $scollname=$_REQUEST['scollname'];
    $tel2=$_REQUEST['tel2'];
    $fax=$_REQUEST['fax'];
    $email=$_REQUEST['email'];
    $about=$_REQUEST['about'];
    $shoar=$_REQUEST['shoar'];
    echo($tel1);
    echo($tel2);
    echo($scollname);
    echo($fax);
    echo($email);
    echo($about);
    echo($shoar);

    ?>
    </body>
    </html>

  2. #2
    Ext JS Premium Member saJoshua's Avatar
    Join Date
    Nov 2007
    Location
    Sydney
    Posts
    526

    Default

    Hi There,

    Seriously....

    I can see you're new. Have a read through these guidelines so that you have more chance of getting a response.
    http://www.extjs.com/learn/Ext_Forum_Help

    There is a community that is available on this forum that has a lot of knowledge that you could tap into if you ask your question clearly, but "i usr this code pelz answr me" tells me that you're about 13 years old, so I won't be too rough on you.

    Have a look through the documentation: http://extjs.com/deploy/dev/docs/?cl...&member=submit

    You can collect your form's data and send via an Ext.Ajax call or even use Ext.Direct

Posting Permissions

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