I would like to add a button that allows a users to make my page their homepage by only pushing a button

Dec 14, 2017

Hi everyone!

I´m looking to add a button to one of my courses that will allow learners to make a page their homepage, I know I´ll probably need to create a Java code and I´m definitly not a Java expert.  I found a code  online but it doesn´t seem to be working. This is the code I´m talking about <a href="hash" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://asp.net');">Click here to make this your default homepage</a>

Any help would be highly appreciated.

Thank you so much!

5 Replies
Allison LaMotte

Hi Paola,

Have you checked out this best practices page? I don't see a code there for adding a page to favorites, but it could help you figure out if you're formulating the code correctly in Storyline.

I'm not a JS expert, so I can't do much more for you that that, sorry! Hopefully someone else from the community will jump in and help you out here.

OWEN HOLT

Strictly speaking, what you posted is html. In HTML, the <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link's destination. This isn't executing as JavaScript because, while it has elements of JS within it, it isn't JS code by itself.

In looking for a solution for you, it appears that the difficulty lies in the way that different web browsers set the home page differently. I'll keep looking but I wouldn't hold my breath. Unless you know all your user will use a specific browser, there may not be a universal solution to this.

This discussion is closed. You can start a new discussion or contact Articulate Support.