Hi Abu Ghufran
i need to show other page when i click in 'ViewMore' cell in colorBox mode style or any popup style , How can i do that ?
this is a Part of my code but not work :
——————————
<html>
<head>
<link media="screen" rel="stylesheet" href="../../../colorbox/colorbox.css" />
<script src="../../../colorbox/jquery.min.1.4.4.js"></script>
<script src="../../../colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="../../lib/js/jqgrid/css/ui.jqgrid.css" />
<script src="../../lib/js/jquery.min.js" type="text/javascript"></script>
<script src="../../lib/js/jqgrid/js/i18n/grid.locale-ar.js" type="text/javascript"></script>
<script src="../../lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../../lib/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
$(document).ready(function() {
$("a[rel='example2']").colorbox();
$("a[rel='example1']").colorbox({
onOpen:function(){ parent.document.getElementById('imain').height=430; },onClosed:function(){parent.document.getElementById('imain').height=430;}
,transition:"fade", width:"85%", height:"85%", iframe:false});
$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
$("a[rel='example4']").colorbox({slideshow:true});
$(".example5").colorbox();
$(".example6").colorbox({iframe:true, innerWidth:470, innerHeight:300});
});
</script>
///////////////////////
/// here is my column detail:
$col = array();
$col["title"] = "View More..";
$col["name"] = "button";
$col["width"] = "40";
$col["align"] = "center";
$col["search"] = false;
$col["sortable"] = false;
$col["default"] = "<a class='example6' target='_blank' href='driver_detail.php?x={id}'><input type='button' height=10 value='More..' /></a>";
$cols[] = $col;
/////////////////////////
it's work for any link out side the grid , but not work in a grid
i have full version , can you help me ?
You need to connect the colorbox binding code in loadComplete event of grid.
$grid["loadComplete"] = "function(ids) { do_onload(ids); }";
$g->set_options($grid);
and in html …
<script type="text/javascript">
function do_onload(){
jQuery(".example6").colorbox({iframe:true, innerWidth:470, innerHeight:300});
};
</script>
it's work 🙂
when i change your last code :
jQuery(".example6").colorbox({iframe:true, innerWidth:470, innerHeight:300});
to :
$(".example6").colorbox({iframe:true, innerWidth:470, innerHeight:300});
thanks Mr. Abu Ghufran