PDA

View Full Version : XmlWriter and XmlStore Extjs 3.0.1 HELP



batiz
16 Sep 2009, 12:05 AM
Hi i have a problem whit this:



<strong>Boutique.js</strong>
<code>
var st = new Ext.data.XmlStore({
storeId: 'boutique',
url: 'http://localhost/workstation/zcoom/boutique/xml/app.php/save',
write: new Ext.data.XmlWriter(),
autoSave: true
});

var donner = Ext.data.Record.create([
{name: 'text', allowBlank: false},
{name: 'id', allowBlank: false},
{name: 'type', allowBlank: false},
{name: 'cls', allowBlank: false},
{name: 'leaf', allowBlank: false, type: 'bool'}
]);

var rec = new donner({
text: 'boutique',
id: '21',
type: 'folder',
cls: 'folder',
leaf: true,
});
st.add(rec);
</code>


and everithing i try it never call app.php



<strong>app.php</strong>
<code>
<?php
$fd = fopen('E:/test.txt', 'w');
fwrite($fd, print_r($_POST, true));
fwrite($fd, "DONE");
fclose($fd);
echo "test";
?>
</code>


this is just a test but hope someone could help me whit this, i'm new in the forums sorry if it isn't the right place to post this

thank for your help and sorry for my english

drew
16 Sep 2009, 7:37 AM
Should the URL be "http://localhost/workstation/zcoom/boutique/xml/app.php" instead of "http://localhost/workstation/zcoom/boutique/xml/app.php/save"

batiz
16 Sep 2009, 11:44 AM
hi thanks for you awnser but i tryed all ready and dose not work

sentientholon
21 Sep 2009, 5:17 AM
hi thanks for you awnser but i tryed all ready and dose not work

Did you mean 'writer:' instead of 'write:' ?