Quantcast
Channel: Lucee Dev - Latest topics
Viewing all articles
Browse latest Browse all 536

CFChart - allow "javascript:" in the url attribute

$
0
0

Would it be possible to get the url attribute enhanced to match the flexibility in ACF?

In ACF, you can call a javascript function from the url attribute in lieu of a strict http/https location. As a stripped down example:
‘cfchart format=“png”
title=“#Local_ChartTitle#”
height=“#Local_ChartHeight#”
width=“#Local_ChartWidth#”
style=“#Local_ChartStyle#”
url="javascript:jsRedirectFunction(’$ITEMLABEL$‘,’$SERIESLABEL$‘,’$VALUE$')"

We’ve used this ability in our applications to dynamically construct a url to redirect the user when clicking on an item in the chart. The constructed target url is generally different for each item. Think, a bar chart where each click on a bar would open a different screen.

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 536

Trending Articles