Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes

I would like to integrate a simple site search, like "Tipue" I have added a form field in my InDesign document but do not know how to attach the HTML and JQuery. I found in Indesign where to insert the text field HTML but other than adding the code to the head of the html file outside of InDesign or In5, I don't see another way of doing this. Of course all of those changes get lost with every update...

in how_to by (250 points)
edited by
  

1 Answer

0 votes
 
Best answer
  1. Give the form field an Object Style (with no spaces in the name). That name will be a CSS class in the output, which can be used to target the input element. Alternatively, if you only have one input field, you can target the input element generically. E.g.,
    $(document).ready(function() {
         $('input[type=text]').tipuesearch();
    });
  2. Attach the JavaScript (and any CSS) in the Resources section of the in5 dialog.
    More info: Extending Functionality with External Resources
    (resources will not be lost--they'll remain attached each time you export)
by (197k points)
selected by