Hi Abu,
My database has links stored without www or http:// in front of them.
The below line gets the hyperlink to work.
$acol["default"] = "<a href='http://{url}' target='_blank'>{url}</a>";
Problem is when I edit or save the record it saves the record with all the extra's in it. Also, in an event I need to access the raw url but once again {$data["params"]["url"]} has all the extra's too.
Also, if I turn the edit for that column when I go into the form that field will not show.
Suggestions?
Thanks
Glenn
Remove $col["link"], $col["linkoptions"] and $col["default"]. Use plain formatter:
$col["formatter"] = "function(cellval,options,rowdata){ return '<a target="_blank" href="http://'+cellval+'">'+cellval+'</a>'; }";
$col["unformat"] = "function(cellval,options,cell){ return $('a', cell).attr('href').replace('http://',''); }";
This will make it raw text when edited and link when displaying.