
previous

page 12
next
and, finally:
function setup() {
var title=document.getElementById('title');
title.textContent=g_dir;
get_pic();
}
var title=document.getElementById('title');
title.textContent=g_dir;
get_pic();
}
All being well, your quiz should work just as before.
Much of the foregoing may seem like overkill but I think you'll be impressed by where this is all heading, so bear with me.
Prepare a new quiz (mine is Movies) by finding suitable images and storing them in a Movies directory. Don't delete your other directory of images.
Add to your pics.js file like this:
g_Landmarks=[
'Big Ben',
...
'Taj Mahal'
];
g_Movies=[
'Australia',
'Babe',
'Crocodile Dundee',
'Dead Calm',
'Evil Angels',
'Gallipoli',
'Japanese Story',
'The Piano'
];
'Big Ben',
...
'Taj Mahal'
];
g_Movies=[
'Australia',
'Babe',
'Crocodile Dundee',
'Dead Calm',
'Evil Angels',
'Gallipoli',
'Japanese Story',
'The Piano'
];
Don't forget to rename your new images, 0.jpg ...
previous
next