I have a Filter Grid page working using this example https://www.jqwidgets.com/jquery-widgets-demo/demos/php/serverfiltering_paging_and_sorting.htm
But now I want to add a composite column out of two columns from my grid such that the newly created column values can be clickable URL. I searched around for a demo and this is the only demo I can find https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customcolumn.htm?arctic
I started playing around with that demo and made my linkrender function where I hard coded http://www.google.com just to play around with:
var linkrenderer = function (row, column, value) {
if (value.indexOf('#') != -1) {
value = value.substring(0, value.indexOf('#'));
}
var format = { target: '"_blank"' };
var html = $.jqx.dataFormat.formatlink("www.google.com", format);
return html;
}
The link http://www.google.com does appear in a new column but when I click it goes to http://localhost/postgresqlphpconnect/www.google.com which is the localhost I am working on, with http://www.google.com concatenated at the end. But I want to go to http://www.google.com instead. Is there any demo that goes through this logic that I can use? And how can I have my endpoint go to the desired destination URL instead of having the link added to the end of my localhost url?