I have a form which has a Search button and a textbox which is displayed a s none.Onclick of this button, it opens an extjs window which has a grid. After selecting the grid column, on clicking OK button of the window, the selected value needs to be populated into the text box in the previous form. I am able to alert the selected value but not able to set it to the textbox. Below is the code which I am using. This is the javascript function called when I click the Ok button in the window.
function replaceButton(){
document.getElementById('pidVal').style.display="block";
document.getElementById('search').style.display="none";
var selectedRecord = Ext.getCmp('pidList').getSelectionModel().getSelected().get('pid');
alert(selectedRecord); // The selected val is alerted correctly here
pidVal.setValue(selectedRecord);
Ext.getCmp('searchWin').close();
}
Could somebody help me in this?
Thanks is advance...