• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Running custom JS code when filter is selected - where to start?

Explorer ,
Oct 19, 2015 Oct 19, 2015

Copy link to clipboard

Copied

Hi there,

I want to add custom JS code that is executed each time the user selects a filter in the filter pane (RH 2015, HTML5 output). Unfortunately, most of the code dealing with the filter pane is minified (common.min.js and rh.min.js). 

Has anyone tried this before? Is there a suitable "entry point" to add custom event code for this? (Tried OnPageClick in ehlpdhtm.js, but that doesn't seem to work since the event.target doesn't change after the first click event for the filter pane is fired).

Views

287

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 20, 2018 Sep 20, 2018

Copy link to clipboard

Copied

LATEST

Although this is a rather old question and the OP probably found an alternate solution by now, I'd like to offer my approach for doing this when using a HTML5 layout (from RH 2015 upward).

I have added an "onClick" attribute to the filter item <input> tags in the template's topic.slp (and homepage.slp if available) files. The onClick attribute can then call a custom JS function, with a delay if needed in order to wait until the filter change is actually applied.

This means you need to adapt the Robohelp template, which can be complicated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp