Dataset view/ticker interactive buttons

CMS Version

2.3.3

Player Type

Windows

Player Version

unknown

Issue

I am very new to javascript so that really doesnt help, I’m sorry about that, but from all the reading that I have done it seems it should be reasonably easy to achieve what I am after, my issue is trying to find the right workaround:

It seems like I need a hybrid dataset view/ticker widget, I need to add some custom html if I add it in the dataset ticker “Main” template, that same html gets repeated on every line but I only want it once. I cannot add custom html to the dataset view.

here is a link to an example of what I am trying to achieve:
https://www.tablefilter.com/alphabetical-pager.html

The table would be filled from the dataset and the alphabetical buttons would filter table rows.

I already have a dataset ticker running with filters, it just cycles through all the matching data, it would be really nice if the end user could select the letter rather than having to wait for their name to scroll past.

I have also successfully created some javascript buttons modifying links to external images - so the interactivity side of it isn’t really the question (I know it works), but more about combining the button functionality with the dataset widget output.

Am I trying to something that just wont work or is there a different path I need to consider?

I’m thinking that if the widgets are just iframes, I could use something along the lines of this, to load an image in one frame, from a button in another:

<button onclick="top.iframe_name.document.getElementById('myImage').src='https://imagelocation.jpg'">Load this image</button>

my issue here is defining the names of the iframes, it seems that they’re named dynamically in the preview, so I can’t getElementById because I dont know the name of the iframe to look in.

my thought process is that if I can manipulate one frame from another by updating a string of code, surely I could achieve the same with an SQL filter - but that depends on where the SQL filter is actually happening I suppose, is the server running the filter and only delivering the filtered results to the player? or does the server deliver the entire dataset and the filter is run within the iframe on the player? hopefully it is the latter, then I’d just need to find the SQL filter string within the iframe to be able to change it with a button.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.