Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by j.lagos on Dec 11, 2008 05:13
open dhtmlx forum
Ajax component use

I have no idea how to use Ajax.

I try the async call of Ajax:
dhtmlxAjax.post("./components/xxxxx/test1.php",params,callback_createGrid);

Into the php I fill the var grid_headings with some strings to be used as the Grid column titles. So, at the end of the php I call print <script> bla,bla,...</script>,
and that's all.

Now, into the FireBug response text the content is:
<script>grid_headings="Board ID,Phase ID,Side,Security status";</script>, as I want to be.

But into the callback function (Client side) I check the var string and it is empty!

Please, have any ideas what is wrong?

Thanks
John
Answer posted by Support on Dec 11, 2008 07:24
You can use it as 
fucntion callback_createGrid(obj){
    alert(obj.xmlDoc.responseText);
}


Also, grid can be fully configured from XML, so you can just use config from XML instead of additional ajax calls
http://dhtmlx.com/docs/products/dhtmlxGrid/samples/initialization_loading/grid_config_xml.html?un=1229009139000