PDA

View Full Version : URGENT!!! Help with treepanel



sebas2515
7 Mar 2012, 2:34 PM
Iīm trying to do a dynamic tree, but it doesn't work.

I send an array form php like this:

C:

$nodes[$i] = array('text' => $categoria[$i]['NombreCategoria'], 'id' => $categoria[$i]['IdCategoria'], 'leaf' => $sw, 'cls' => 'folder');


but i get the next error

records[i] is undefined






ns[i].viewRecordId = records[i].internalId;




When i take out the line red in the php code, the error doesnīt apear, but the parameter node isnīt
send to the server. I need some help with this.

dedoz
7 Mar 2012, 3:28 PM
which "line red" ? isntead of looking at the php code look at the response data, you can check that with any desktop developer tool, check data thats is sent to server and the data in response

if the data in response is wrong, then u have a problem in server side (ur php)
if the data in response is correct then u have a problem in client side (javascript - extjs)
check the data sent to the server, its correct ? if so then ur problem is not in the comunication server <-> client,
u have a problem in a another code maybe while building the tree, ur not giving it the right fields or something.
checks those data and post them if you are not sure if its correct.

(sorry for my english)