<script> function changeCardServiceStatus(cardServiceId){ window.location.href='changeCardServiceStatus.htm?cardServiceId='+cardServiceId; } Ext.onReady(function(){ var data=[ <c:forEach items="${list}" var="list" varStatus="status"> [ '${list.cardServiceAction}', '${list.cardServiceId}', '${list.status}' ] <c:if test='${status.last == false}'>,</c:if> </c:forEach> ]; function changeCardServiceStatus(value, cellmeta, record, rowIndex, columnIndex, store){ var status=""; //alert(record.data["con9"]); if(record.data["con9"]=="1"){ status = "Active"; }else{ status = "Inactive"; } s = "<div align='left'><a href="#" mce_href="#" οnclick='changeCardServiceStatus("+value+")'>"+status+"</a></div>" return s; } var store=new Ext.data.SimpleStore({ data:data,fields:['con5','con8','con9'] }); var colM=new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), {header:'cardService Action',dataIndex:'con5', width:150}, {header:'Active/Inactive ',dataIndex:'con8', width:150, renderer:changeCardServiceStatus}, ]); var grid = new Ext.grid.GridPanel({ renderTo:'display', title:"cardService list", autoHeight: 'true', width:500, cm:colM, store:store, loadmask: true, stripeRows: true }); });