Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Tried This Code.But I can Not Find Solution.....

I Want to retrive value from One Combobox to Another combobox
PHP
<?php require "_header.php" ?>

JavaScript
<script type="text/javascript" language="javascript">
 
Ext.onReady(function(){

var id=
[
[1],
[2]
]

var complain =
[
['A-1'],
['A-2']
]

 
var Scomplain =
[
['A1'],
['A2']
]



var mycomplain = new Ext.data.ArrayStore({
data:[complain],
fields:['id','complain']
});


var myscomplain = new Ext.data.ArrayStore({

data:Scomplain,
fields:['id','Scomplain']
});
 

var comboform = new Ext.FormPanel({

id:'comboform',
method:'post',
layout:'form',
frame:true,

items:[{

columnWidth:1,
layout:'form',
items:[{

xtype:'combo',
fieldLabel:'Complaint',
id:'id',
name:'complain',
store:mycomplain,
displayField:'complain',
multiSelect: true,
mode:'local',
triggerAction: 'all',
lastquery:''
}
,
{

xtype:'combo',
fieldLabel:'SComplaint',
store:myscomplain,
displayField:'Scomplain',
multiSelect: true,
mode:'local',
triggerAction: 'all',
listeners:{select:{fn:function(combo, value)
{
myscomplain.filter('id',combo.getValue());
}}}
}
]
}]


});



var MasterCombo = new Ext.Window({


title:'Compaint',
height:200,
width:300,
items:comboform
});

var varwidth = (screen.width - MasterCombo.width)/2;
MasterCombo.show();
});
</script>



PHP
<?php require "_footer.php" ?>
Posted
Updated 26-Sep-14 5:11am
v2

1 solution

 
Share this answer
 
Comments
Viral Patva 27-Sep-14 0:51am    
Thank Ajay.

But I want Create Dependent Combo without using database so how can I acheive that ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900