PDA

View Full Version : [resolved]Php problem



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'];
}
?>

tryanDLS
12 May 2007, 12:47 PM
"Does not work" doesn't tell people much. If you expect anyone to help you, you need to make an effort to debug the problem (using Firebug), and then post more information if you can't solve the problem. Before posting you should also search the forums to see if anyone has posted a similar issue.

millenium
12 May 2007, 12:53 PM
Thanks for your reply.
I did what you say.

There's no errors, when clicking on the "ok" button, nothing happens, and there's no error, i've searched through the posts and didn't find anything.

I know my problem is a simple problem :">

millenium
12 May 2007, 12:55 PM
Sorry there was an error, all my appologies,

For people who have the same problem:


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();
});
});

malg
23 Oct 2007, 8:41 PM
I am having the same problem as you did.
I don't understand how you fixed it, your last post just shows the JS code relabelled as PHP code.
Could you help me understand ?

Jamiroquai
24 Oct 2007, 6:00 AM
What he did was put "" to the url.

At least that's what im able to catch as difference between the two codes.

Good Luck!