On the last line is pic_list is the python list. Is it possible to index the Python list using a javascript variable within a Flask Jinja2 template?
function moveright(cur_pos, list_length) {
if (current_position !== -9999) {
current_position = cur_pos;
}
if (current_position < list_length - 1) {
current_position = current_position + 1;
} else {
current_position = 0;
}
document.getElementById('image').src = {
{
pic_list[current_position]
}
};
}
pic_list, and refer to than in the js function.