Categories | Question details Back To List | ||
fetch data from dhtmlx using ajax Hello, In my code i have to fetch data from ajax to my code but it gives me epty result. please give me solutions. this is my code <?php $res=mysql_connect("localhost","root",""); mysql_select_db("kanibrainnew1"); require_once("../dhtmlxConnector_php/codebase/grid_connector.php"); $grid = new GridConnector($res); $grid->dynamic_loading(100); $projID=$_REQUEST['projid']; //if($grid->is_select_mode()){//code for loading data $grid->render_sql("select * from shot,shotTaskArtist where shotTaskArtist.projID = shot.projID and shot.projID='om' and shotTaskArtist.shotID = shot.shotID","shotID","shotID,shotStatus,taskID,TaskREF,task_note,mandays,userID,taskStatus,startDate,endDate,priority,naxt_sub,last_sub,actualMandays,supervisorName"); ?> this is html file <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script >window.dhx_globalImgPath = "http://localhost/tracker/task_manage/codebase/imgs/";</script> <link rel="stylesheet" href="http://localhost/tracker/include/css/one_col.css" type="text/css" media="all"> <link rel="stylesheet" href="http://localhost/tracker/include/css/tableDesign.css" type="text/css" media="all"> <link rel="stylesheet" href="http://localhost/tracker/include/css/bubbleCss1.css" type="text/css" media="all"> <link rel="stylesheet" href="http://localhost/tracker/include/css/bubbleCss2.css" type="text/css" media="all"> <link rel="stylesheet" href="http://localhost/tracker/include/css/ui.css" type="text/css" media="all"> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/autosuggest.css" /> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/suggestUserID.css" /> <!-- addd for multiple select dropdown ---> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/ui.dropdownchecklist.css" /> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/demo.css" /> <!-- addd for multiple select dropdown ---> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/dhtmlgoodies_calendar.css" /> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/infoArtist.css" /> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/style.css" /> <!-- New Task Management Css --> <link rel="stylesheet" type="text/css" href="http://localhost/tracker/include/css/table.css" /> <link rel='STYLESHEET' type='text/css' href='../dhtmlxGrid/codebase/dhtmlxgrid.css'> <link href='../dhtmlxGrid/codebase/ext/dhtmlxgrid_pgn_bricks.css' rel='STYLESHEET' type='text/css'> <link rel="STYLESHEET" type="text/css" href="../dhtmlxGrid/codebase/calendar/dhtmlxcalendar.css"> <script src='../dhtmlxGrid/codebase/dhtmlxcommon.js'></script> <script src='../dhtmlxGrid/codebase/dhtmlxgrid.js'></script> <script src='../dhtmlxGrid/codebase/dhtmlxgridcell.js'></script> <script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js'></script> <script src='../dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js'></script> <script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script> <script src='../dhtmlxConnector_PHP/codebase/connector.js'></script> <script src="../dhtmlxGrid/codebase/calendar/dhtmlxcalendar.js"></script> <script src="../dhtmlxGrid/codebase/calendar/excelll/dhtmlxgrid_excell_dhxcalendar.js"></script> <link rel="STYLESHEET" type="text/css" href="../../../dhtmlxCalendar/codebase/skins/dhtmlxcalendar_yahoolike.css"> <link rel="STYLESHEET" type="text/css" href="../dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_black.css"> <!--<script src='codebase/dhtmlxcombo.js'></script> <script src="codebase/dhtmlxcommon.js"></script> <link rel='STYLESHEET' type='text/css' href='codebase/dhtmlxcombo.css'> --> <script> function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e){ try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } </script> </head> <body> <table width="100%" border="0"> <tr> <td bgcolor="#006393"><table width="100%" border="0"> <tr> <td><a href="<?php echo $systempath;?>home/index.php" style="border: #777777 solid 1px; background-color:#b9c9fe" >Home</a></td> <td> <a href="<?php echo $systempath;?>review/index.php" style="border: #777777 solid 1px; background-color:#b9c9fe">Dailies Review</a></td> <td> <a href="<?php echo $systempath;?>commonElements/index.php" style="border: #777777 solid 1px; background-color:#b9c9fe">Elements</a></td> <td> <a href="<?php echo $systempath;?>createFolders/index.php" style="border: #777777 solid 1px; background-color:#b9c9fe">Folder Structure</a></td> <td> <a href="<?php echo $systempath;?>taskManagement_new/manDay.php" style="border: #777777 solid 1px; background-color:#b9c9fe">ManDays Details</a></td> <td> <a href="<?php echo $systempath;?>upload/index.php" style="border: #777777 solid 1px; background-color:#b9c9fe">Upload Details</a></td> <td> <a href="<?php echo $systempath;?>uploadOld/index.php" style="border: #777777 solid 1px;background-color:#b9c9fe">Upload Details Old</a></td> <td> <a href="<?php echo $systempath;?>downloadDetails/index.php" style="border: #777777 solid 1px;background-color:#b9c9fe">Download Details</a></td> <td> <a href="<?php echo $systempath;?>efficiency/index.php" style="border: #777777 solid 1px;background-color:#b9c9fe">Efficiency</a></td> <td> <a href="<?php echo $systempath;?>missingFile/index.php" style="border: #777777 solid 1px;background-color:#b9c9fe">Check Missing File</a></td> <td> <a href="<?php echo $systempath;?>addArtist/index.php" style="border: #777777 solid 1px;background-color:#b9c9fe">Artist List</a></td> <td> <a href="<?php echo $systempath;?>about_anibrain/index.php" style="border: #777777 solid 1px;background-color:#b9c9fe">About Anibrain</a></td> <td> </td> <td> </td> </tr> </table> </td> </tr> <tr><td height="20"></td></tr> <tr><td height="10"><table width="100%" border="0"> <tr> <td bgcolor="#004f8f"><table width="100%" border="0" bgcolor="#999999"> <tr> <td width="17%" valign="middle" ><div id="combo_zone3" style="width:150px; height:15px;"></div></td> <td width="13%"><input type="button" style="background:#4B708D;color:#CFDCE7" name="excelSheet" value="Generate Excel Sheet" onClick="generateExcelTaskManagement(document.getDetail1.projID.value)"></td> <td width="13%"><input type="button" style="background:#4B708D;color:#CFDCE7" name="excelSheet" value="Generate Excel Sheet" onClick="generateExcelTaskManagement(document.getDetail1.projID.value)"> </td> <td width="12%"><input type="button" style="background:#4B708D;color:#CFDCE7" name="excelSheet" value="Import Excel Sheet" onClick="window.open('importExcelFile.php','ImportExcel','status=no,width=450,height=140,scrollbar=yes')"> </td> <td width="5%"> </td> <td width="8%"> </td> <td width="32%"> </td> </tr> </table></td> </tr> </table> </td></tr> <tr><td height="20"></td></tr> </table> <div id="gridbox" style="width:1165px; height:902px;"></div> <div id="params" style="width:1165px; height:902px;"></div> <script> mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath('dhtmlxGrid/codebase/imgs/'); mygrid.setHeader("ShotID,Shotstatus,TaskID,Taskref,Task-Note,Alloted Mandays,UserID,TaskStatus,StartDate,EndDate,Task Priority,Next-Sub,Last-Sub,Actual Mandays,Supervisor"); /*mygrid.setColTypes("ed,ed,ed,ed,ed,ed,ed,ed,ed,dhxCalendarA,ed,ed,ed,ed");*/ mygrid.setSkin("modern") mygrid.attachHeader("#connector_text_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter, ,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_text_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_text_filter") mygrid.setColSorting("connector,int,connector") mygrid.init(); mygrid.enableSmartRendering(true); mygrid.enableMultiselect(true); mygrid.loadXML("connector.php"); var dp = new dataProcessor("connector.php"); dp.init(mygrid); /*var z = new dhtmlXCombo("combo_zone3", "alfa3", 200); z.loadXML("common/test.php"); z.attachEvent("onChange",function() { var selected_value=z.getActualValue(); //alert(selected_value); /* strURL = 'connector.php?projid='+selected_value; //alert(strURL); var req = getXMLHTTP(); if (req) { req.open("GET", strURL, true); req.send(null); req.onreadystatechange = function() { if (req.readyState == 4) { if (req.status == 200) { //alert(req.responseText); //document.getElementById('gridbox').innerHTML=req.responseText; document.getElementById('params').innerHTML=req.responseText; //alert(document.getElementById('gridbox').innerHTML); } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } }*/ //}) </script> </body> </html> wuth the helpmof below code i m passing the value of select box to connector.php and showing result buut it gives me empty result reply me as sson as possible Answer posted by Alex (support) on Dec 08, 2009 02:01 Hello, try to enable log to get details about the issue. $grid->enable_log("temp.log",true); |