Hi,
i have hidden variable which is update when the row is selected in GridView, and i need this value in java script, we are trying to modify in igf_grid.js
this.selectRow=function(domNode,select){
......}}this.customFLT()};
in the customFLT() method just i am tring to print value using alert(of javascript) method, which works fine and i am able to see the value i have seleted from GridView, and i have to use this variable to some other method, when i removed the alert method than i am not able to get the selected value. if i add alert method than its works fine. and i have set " immediate="true" " of hiddenvariable in JSF.
please let me know what is causing this problem.
thanks in advance.
dayananda b v
You don't get the 'Hello'-alert? With me it was working.
sorry, i tried like that only, but the alert is not coming up,
this.selectRow=function(domNode,select){ var row=this.getTargetRow(domNode); if(!ig.isNull(row)){if(select){row.select();} else{row.unselect();} var grid=this.getGrid(domNode);if(!ig.isNull(grid)&&grid.isImmediateRowsChangeEvent()){
ig.smartSubmit(grid.elm.id,null,null, null, this.customFLT);}}};
this.customFLT=function(){ alert("Hello”); // alert("Hidden Field = " + parent.frames.document.getElementById("form1:hiddenField1").value);
var arraystr= parent.frames.document.getElementById("form1:hiddenField1").value; // here i am calling applet method pasing the value of arraystr,
};
you have to call smartSubmit with this.customFLT set as the 5-th parameter, like this:
ig.smartSubmit(grid.elm.id,null,null, null, this.customFLT);
Hope it will work now!
hi,
thanks for your quick replay, as i tried what you suggested but the method is not calling, here the modified code. And I have added alert statement with a string “Hello”, alert statement is not coming up.
this.selectRow=function(domNode,select){ var row=this.getTargetRow(domNode); if(!ig.isNull(row)){if(select){row.select();} else{row.unselect();} var grid=this.getGrid(domNode);if(!ig.isNull(grid)&&grid.isImmediateRowsChangeEvent()){ig.smartSubmit(grid.elm.id,null,null, this.customFLT);}}};
Thanks
Dayananda B V
smartSubmit is an AJAX method which means it is asynchronous. This presumes it's result is retrieved after some time. Try with ig.smartSubmit(grid.elm.id,null,null, null, this.customFLT). The fifth parameter is a callback function, which is called after getting the data.
Hope this helps!