Custom nav-next

Re: Custom nav-next

by Andre Paz Leal -
Number of replies: 1

Ok continuing the development, I have changed the function to call the next SCO:

var scorm_launch_next_sco = function () {
scorm_activate_item(scorm_skipnext(scorm_current_node, true));};

But only goes thru one time after the first click, calling the function thru a simple button created on the player.php.

Y.one('#andreNext').on('flick', scorm_launch_next_sco);

 

 

 

 

 

 

 

 

In reply to Andre Paz Leal

Re: Custom nav-next

by Andre Paz Leal -

This os not the solution that I´ve wanted but I only know JS so.

 var scoidElements = document.getElementsByName('scoid')[0];
 var nextButton = document.getElementById('nextButton');
var previousButton = document.getElementById('previousButton');

var nextScoid = function() {
var i = scoidElements.selectedIndex;
scoidElements.selected = true;
scoidElements.selectedIndex = i+1;
document.getElementById('tocmenu').submit()
}
var previousScoid = function() {
var i = scoidElements.selectedIndex;
scoidElements.selected = true;
scoidElements.selectedIndex = i-1;
document.getElementById('tocmenu').submit()
}
nextButton.onclick=function() {
nextScoid();
};
previousButton.onclick=function() {
previousScoid();
};