/** * Render row * * @param Varien_Object $row * @return string */ public function render(Varien_Object $row) { $data = '<div id="show_' . $row->getIncrementId() . '"><span onclick="FunctionShow(' . $row->getIncrementId() . ')" ><a>Show Licence</a></span></div>'; $data .= '<div id="hide_' . $row->getIncrementId() . '" style="display:none;"><span onclick="FunctionHide(' . $row->getIncrementId() . ')"><a>Hide Licence</a></span></div>'; $data .= '<div id="' . $row->getIncrementId() . '" style="display:none;">' . $row->getLicenceKey() . '</div>'; $data .= '<script type="text/javascript"> function FunctionShow(incrementid){ document.getElementById(incrementid).style.display = "block"; document.getElementById("show_"+incrementid).style.display = "none"; document.getElementById("hide_"+incrementid).style.display = "block"; //alert(incrementid); } function FunctionHide(incrementid){ document.getElementById(incrementid).style.display = "none"; document.getElementById("show_"+incrementid).style.display = "block"; document.getElementById("hide_"+incrementid).style.display = "none"; //alert(incrementid); } </script>'; return $data; }