I wanted to do just more than have links to other pages, most sites i
create i use the mod_rewrite in htaccess to eliminate full paths of
files there fore $_GET in the address will not work. I basically copied
and pasted the link to apply different types of commands to the cells
via (email link, form post link, ajax window open link) attached is the
code
Rico.TableColumn.setform = Class.create();
Rico.TableColumn.setform.prototype = {
initialize: function(href,target) {
this._href="javascript:postit('"+href+"','"+target+"')";
this._target=target;
this._anchors=[];
},
_create: function(gridCell,windowRow) {
this._anchors[windowRow]=RicoUtil.createFormField(gridCell,'a',null,this.liveGrid.tableId+'_a_'+this.index+'_'+windowRow);
if (this._target) this._anchors[windowRow].onclick=this._target;
this._clear(gridCell,windowRow);
},
_clear: function(gridCell,windowRow) {
this._anchors[windowRow].href='';
this._anchors[windowRow].innerHTML='';
},
_display: function(v,gridCell,windowRow) {
this._anchors[windowRow].innerHTML=v;
var
getWindowValue=this.liveGrid.buffer.getWindowValue.bind(this.liveGrid.buffer);
this._anchors[windowRow].href=this._href.replace(/\{\d+\}/g,
function ($1) {
var colIdx=parseInt($1.substr(1));
return getWindowValue(windowRow,colIdx);
}
);
}
}
Rico.TableColumn.setpage = Class.create();
Rico.TableColumn.setpage.prototype = {
initialize: function(href,target) {
this._href="javascript:open_page('"+href+"','"+target+"','"+target+"')";
this._target=target;
this._anchors=[];
},
_create: function(gridCell,windowRow) {
this._anchors[windowRow]=RicoUtil.createFormField(gridCell,'a',null,this.liveGrid.tableId+'_a_'+this.index+'_'+windowRow);
if (this._target) this._anchors[windowRow].onclick=this._target;
this._clear(gridCell,windowRow);
},
_clear: function(gridCell,windowRow) {
this._anchors[windowRow].href='';
this._anchors[windowRow].innerHTML='';
},
_display: function(v,gridCell,windowRow) {
this._anchors[windowRow].innerHTML=v;
var
getWindowValue=this.liveGrid.buffer.getWindowValue.bind(this.liveGrid.buffer);
this._anchors[windowRow].href=this._href.replace(/\{\d+\}/g,
function ($1) {
var colIdx=parseInt($1.substr(1));
return getWindowValue(windowRow,colIdx);
}
);
}
}
Rico.TableColumn.email = Class.create();
Rico.TableColumn.email.prototype = {
initialize: function(href,target) {
this._href="mailto:"+href;
this._target=target;
this._anchors=[];
},
_create: function(gridCell,windowRow) {
this._anchors[windowRow]=RicoUtil.createFormField(gridCell,'a',null,this.liveGrid.tableId+'_a_'+this.index+'_'+windowRow);
if (this._target) this._anchors[windowRow].onclick=this._target;
this._clear(gridCell,windowRow);
},
_clear: function(gridCell,windowRow) {
this._anchors[windowRow].href='';
this._anchors[windowRow].innerHTML='';
},
_display: function(v,gridCell,windowRow) {
this._anchors[windowRow].innerHTML=v;
var
getWindowValue=this.liveGrid.buffer.getWindowValue.bind(this.liveGrid.buffer);
this._anchors[windowRow].href=this._href.replace(/\{\d+\}/g,
function ($1) {
var colIdx=parseInt($1.substr(1));
return getWindowValue(windowRow,colIdx);
}
);
}
}
on 13.09.2007 15:28
on 13.09.2007 15:30
BTW i edited the ricoLiveGrid.js file in the src folder, if anyone knows of a more optimized control please by all means let me know.


