Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

render link to absolute path

$
0
0

i have a page with a datatable which has a column which renders the data as a link to a file in a (documents) folder, like so...

return '<a href="/documents/'+data+'">'+data+'</a>' ;

if i want to link to an external path I tried just omitting the documents path

return '<a href="'+data+'">'+data+'</a>' ;

but this gives me an error, the generated url looks like this, <a href="plugins'+data+'">'+data+'</a>

presumably because the page containing my datatable is a plugin page (in a folder called plugins), one level below the 'parent' page.

is there a way to generate the absolute url ?


Viewing all articles
Browse latest Browse all 2364

Trending Articles