millenium
12 May 2007, 12:40 PM
Hy all,
I discover this framework and began to read the "getting started" section.
There was an example to communicate with php.
I did everything needed but it doesn't work.
I paste here my codes,
Thanks in advance for your help
html code:
<div id="msg" style="visibility:hidden"></div>
Name: <input type="text" id="name" name="name"/><br />
<input type="button" id="okButton" value="OK" />
Js code:
Ext.onReady(function(){
Ext.get('okButton').on('click', function(){
var msg = Ext.get("msg");
msg.load({
url: test.php, // <-- replace with your url
params: "name=" + Ext.get('name').dom.value,
text: "Updating..."
});
msg.show();
});
});
Php code:
<?php
if(isset($_POST['name'])){
echo 'From server:'.$_POST['name'];
}
?>
I discover this framework and began to read the "getting started" section.
There was an example to communicate with php.
I did everything needed but it doesn't work.
I paste here my codes,
Thanks in advance for your help
html code:
<div id="msg" style="visibility:hidden"></div>
Name: <input type="text" id="name" name="name"/><br />
<input type="button" id="okButton" value="OK" />
Js code:
Ext.onReady(function(){
Ext.get('okButton').on('click', function(){
var msg = Ext.get("msg");
msg.load({
url: test.php, // <-- replace with your url
params: "name=" + Ext.get('name').dom.value,
text: "Updating..."
});
msg.show();
});
});
Php code:
<?php
if(isset($_POST['name'])){
echo 'From server:'.$_POST['name'];
}
?>