Demo of URL Link

QuestionsDemo of URL Link
Ty asked 9 years ago

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!

4 Answers
Ty answered 9 years ago

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.

Abu Ghufran answered 9 years ago

Try using following with column option:

// raw link formatter
$col["formatter"] = "function(cellval,options,rowdata){ return '<a target="_blank" href="http://'+cellval+'">'+cellval+'</a>&#039;; }";
$col["unformat"] = "function(cellval,options,cell){ return $('a', cell).attr('href').replace('http://&#039;,''); }";

Abu Ghufran answered 9 years ago

Another option is to use:

$col["default"] = "<a href='http://{800contacts_url}'>{800contacts_url}</a>";

Your Answer

12 + 4 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?