O.k., thanks for the help.
Here is the resulting code in case you are interested. And it should be XHTML 1.1 strict compliant.
“function openChildWindow(cUrl, cName, cFeatures) {
var cName = window.open(cUrl, cName, cFeatures);
return false;
}”
“$.fn.fmatter.jslink = function(cellval, opts) {
var op = {baseLinkUrl: opts.baseLinkUrl, addParam: opts.addParam || “”, target: opts.target, idName: opts.idName },
target =
“”, idUrl;
if(!isUndefined(opts.colModel.formatoptions)) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if(op.target)
{
if(op.target == 'unique')
{target = op.idName+opts.rowId+cellval;}
// so every different link will open in it's own window
else
{target = op.target;}
}
idUrl =
'onclick=”return openChildWindow(' + 'this.href,'' + target +'',''+ op.addParam + ''); return false;”';
if(isString(cellval) || isNumber(cellval)) { //add this one even if its blank string
return '<a href="' + op.baseLinkUrl + '?' + op.idName + '=' + cellval + '”' + idUrl + '>' + cellval + '';
}
else {
return $.fn.fmatter.defaultFormat(cellval,opts);
}
};
“
Sample colmodel:
{ name: 'itemNum', index: 'itemNum', formatter:'jslink', formatoptions:{baseLinkUrl:'whatever.HTML', idName:'itemNum', target:'unique', addParam:'height=200,width=400'}, width: 80, sorttype: “int” },