Hello. Everyone loves your product.
Can you please direct me to one of the demos that shows a cell of data that when clicked on goes to a webpage.
I have a column that has dollar amounts, and I want to be able to click on that data and have the browser open to a new webpage of a URL that is in my database associated to that record.
Thank you!
Demo: http://phpgrid.org/demo/demos/appearence/external-link.php
Code: http://phpgrid.org/demo/demos/appearence/external-link.phps
Abu,
When we add this code:
$col = array(); $col["title"] = "800 Contacts<br>URL"; $col["name"] = "walmart_url"; //$col['link'] = "http://{800contacts_url}"; $col["width"] = "9"; $col["align"] = "right"; $col["editable"] = false; $cols[] = $col;
The page will not load.
We are getting:
Uncaught RangeError: Maximum call stack size exceeded
As you know I have the paid Premium version.
Thank you for your help on this.
Try using following with column option:
// raw link 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://',''); }";