Great! And I didn't mean to be so standoffish about it. Reading back to what I wrote, I think I really came off that way, sorry.
If I knew more about how:
Code:
new Caption("<div id='clickback' class='left'><img width='330' height='367' src='" + randimage() + "' /></div>")
ends up on the screen as a seen image, we could perhaps use the Caption function to put a button or link for each function on the screen as well.
It might be as simple as:
Code:
var lastIndex = -1;
function randimage() {
var currIndex = lastIndex;
while (currIndex == lastIndex) {
currIndex = Math.floor(Math.random() * image.length);
}
lastIndex = currIndex;
return image[currIndex];
}
function nextImage(){
document.getElementById('clickback').getElementsByTagName('img')[0].src = image[(++lastIndex + image.length) % image.length];
}
function prevImage(){
document.getElementById('clickback').getElementsByTagName('img')[0].src = image[(--lastIndex + image.length) % image.length];
}
views.cardsStart = function (viewName, viewConfig, callback) {
var view = new View();
view.title = "Vc";
var contents = [];
contents.push(
new Container([
new Caption("<div id='clickback' class='left'><img width='330' height='367' src='" + randimage() + "' /></div>" +
"<div><a href='#' onclick='prevImage(); return false;'>Previous</a> " +
"<a href='#' onclick='nextImage(); return false;'>Next</a></div>"),
])
);
Bookmarks