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>
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.
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.
I do have a question other than if it is possible. I would ask should you?
Unless you are in a corporate environment your homepage is a personal thing, it is good that a solution does not exist I would be annoyed if any site took over my homepage.
Agreed 100%. Additionally, modern browsers allow you to have/set alternative homepages for different tabs. Why would I ever want someone to override all of my homepage settings?
5 Replies
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.
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.
I do have a question other than if it is possible. I would ask should you?
Unless you are in a corporate environment your homepage is a personal thing, it is good that a solution does not exist I would be annoyed if any site took over my homepage.
Good point, Phil!
Agreed 100%. Additionally, modern browsers allow you to have/set alternative homepages for different tabs. Why would I ever want someone to override all of my homepage settings?
This discussion is closed. You can start a new discussion or contact Articulate Support.