Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 08, 2009 04:25
open dhtmlx forum
is it possible in dhtmlx to show dhtmlxgrid when i select the value from select box in onchnage event

Hello,


i want to show data onchnage event of select box in dhtmlxgrid . i am tried but it give me empty result is it possible using dhtmlx to show data onc hange event please reply me if possible then please tell me how it is possible . i am sending u my code to you.

please reply me as soon as possible.

<!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='../dhtmlxConnector_php/samples/common/dhtmlx.js'></script>
    
    <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'>


</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("Add/Del,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();
    
var loader = dhtmlxAjax.getSync("connector.php?projid="+selected_value);
alert("Request Sent"+selected_value);
         outputResponse(loader);


})
    function outputResponse(loader) {
if (loader.xmlDoc.responseXML != null)
alert("We Got Response\n\n" + loader.doSerialization());
    document.getElementById('gridbox').innerHTML=loader.doSerialization();
    

}
</script>
</body>
</html>



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


$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");

?>
what i do reply me

thanks
Answer posted by Alex (support) on Dec 08, 2009 07:01

Hello,

what onChange event do you mean ?

There are dhtmlxCombo object with onChange event handler in your code and select filters in grid header.