Order of scripts in HTML5 output

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
CSharp
Jr. Propeller Head
Posts: 4
Joined: Thu Jul 31, 2014 6:54 am
Location: Northern Ireland
Contact:

Order of scripts in HTML5 output

Post by CSharp »

I have a reference to jquery-ui.min.js in the <head> of my master page - it's used to create some pop-up dialogs in an image map, among other things.

When I build the HTML5 help, to get the jQuery UI items AND the tablet/mobile navigation menu to work, I have to move the reference to jquery-ui.min.js in the output pages from the bottom of the list of scripts in the <head> to just after the reference to jquery.min.js which has been inserted by Flare.


QUESTION: Is there any way of forcing Flare to include the script at the desired position in the output pages? Or at least of automating the post-build step of moving the reference? There's only a handful of pages in the set at the moment but the number will grow, and it's a pain to have to manually make changes to every single file every time I build them.

I'm using Flare 12 with a TopNav skin, which doesn't have the old option of including scripts in the toolbar (though I don't know if that would have solved this problem or not).

Note: I know that including this script breaks the search, but that's a sacrifice I can deal with for the moment in this particular set of pages.
Catherine Sharp MISTC - Technical Author, AVEVA
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: Order of scripts in HTML5 output

Post by NorthEast »

CSharp wrote:I have to move the reference to jquery-ui.min.js in the output pages from the bottom of the list of scripts in the <head> to just after the reference to jquery.min.js which has been inserted by Flare.
Why are you having to move the script?
Is there some conflict with another script, e.g. MadCapAll or Foundation?


HTML5 output uses Foundation, and frameworks generally don't get on together; do you know if jQueryUI would actually work alongside Foundation?


As a side thought, Flare already utilises RequireJS; so it might be worth trying to load jQueryUI via RequireJS (if you can be bothered).
CSharp
Jr. Propeller Head
Posts: 4
Joined: Thu Jul 31, 2014 6:54 am
Location: Northern Ireland
Contact:

Re: Order of scripts in HTML5 output

Post by CSharp »

Thanks for the reply, Dave.
Dave Lee wrote:Why are you having to move the script?
Is there some conflict with another script, e.g. MadCapAll or Foundation?
There's definitely a conflict though I hadn't identified yet which script it's with. I'll work through moving the jquery-ui.min.js up one script at a time to see where the conflict is.
Dave Lee wrote:HTML5 output uses Foundation, and frameworks generally don't get on together; do you know if jQueryUI would actually work alongside Foundation?
I've checked this and they can work alongside each other.
Dave Lee wrote:As a side thought, Flare already utilises RequireJS; so it might be worth trying to load jQueryUI via RequireJS (if you can be bothered).
I'll give this a try. Cheers.
Catherine Sharp MISTC - Technical Author, AVEVA
neilm
Jr. Propeller Head
Posts: 3
Joined: Thu Oct 16, 2014 10:31 am

Re: Order of scripts in HTML5 output

Post by neilm »

HI there - I'm having the exact same issue. I just need to be able to load jqueryui, following from this thread it appears I'll have to do it with require.js. CSharp, were you able to determine how to get requirejs to load jqueryui, perhaps?
Post Reply