Issues adding Javascript in newskin

This forum is for all Flare issues not related to any of the other categories.
Post Reply
ktbCA57
Sr. Propeller Head
Posts: 473
Joined: Wed Feb 04, 2009 7:45 am

Issues adding Javascript in newskin

Post by ktbCA57 »

We have been unable to add javascript within new skin that came with upgrade to Flare 11...

Since there's no toolbar (where we previously added js) within the section - so we tried this method in the Internal text editor...just before the </strings> element, we added the js we want to use - like this:

<Stylesheet />
<Script>$(document).ready(function(){
$("#header>a").after('<div id="header-title"></div>');
$("#header-title").text(document.title);
});

$(document).ready(function(){
$("#responsiveHeader>a").after('<div id="responsive-header-title"></div>');
$("#responsive-header-title").text(document.title);
});

$('<link>')
.appendTo($('head'))
.attr({type: 'text/css', rel: 'stylesheet'})
.attr('href', 'Content/Resources/Stylesheets/skin.css');

$('<link>')
.appendTo($('head'))
.attr({type: 'text/css', rel: 'stylesheet'})
.attr('href', 'content/resources/stylesheets/skin.css');
</Script>
<Strings />
</CatapultSkin><Strings />

but doing this did NOT work - basically, the script was not picked up... so is there another place or way we should be adding this to the skin editor?

Thanks
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Issues adding Javascript in newskin

Post by NorthEast »

Well, I recognise the script, as it's the one I wrote for the v10 HTML5 skin - which is now called the 'Tripane' HTML5 skin in v11.
This script still works for the Tripane skin in v11, and you would add it in exactly the the same place on the Toolbar tab.

However, if you're not using the Tripane skin, and are using the top navigation and/or component skins; then why are you trying to add a script to the skin? These skins will generate a frameless single-page output, so if you want to add a script then just add it to the master page.
ktbCA57
Sr. Propeller Head
Posts: 473
Joined: Wed Feb 04, 2009 7:45 am

Re: Issues adding Javascript in newskin

Post by ktbCA57 »

Thanks Dave,

ok.. we are going to try to make the changes in the Master Page... still unclear as to how it works but that's because I'm not very well skilled/schooled in the skinning HTML5 world...

so I will come back around with 1) more questions, or 2) a resolution that we solved our issues.

Thanks for your input!
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Issues adding Javascript in newskin

Post by NorthEast »

That script will only be of use with the Tripane skin in v11. It adds a title to the header, and adds a skin stylesheet.
If you're not using a Tripane skin, then don't use that script.
Post Reply