novice2004
Programmer
Help please,
Can anybody look at this code:
Everything works fine when I use Line 1.
When I tried to use Line 2 instead of Line 2 I got empty page.
I am trying to use var imgSrc without success.
Path to pictures: "" ...
function openInsidePage(i) {
var imgSrc="
writeln('function nextImage() {');
writeln('if (currentPicture != totalPictures) {');
writeln('currentPicture++');
Line 1:
writeln('document.mainimage.src = " + currentPicture + ".jpg";'); //works
Line 2:
writeln('document.mainimage.src = "' + imgSrc + 'picture' + currentPicture + '.jpg";'); //does not work
Thank you
Can anybody look at this code:
Everything works fine when I use Line 1.
When I tried to use Line 2 instead of Line 2 I got empty page.
I am trying to use var imgSrc without success.
Path to pictures: "" ...
function openInsidePage(i) {
var imgSrc="
writeln('function nextImage() {');
writeln('if (currentPicture != totalPictures) {');
writeln('currentPicture++');
Line 1:
writeln('document.mainimage.src = " + currentPicture + ".jpg";'); //works
Line 2:
writeln('document.mainimage.src = "' + imgSrc + 'picture' + currentPicture + '.jpg";'); //does not work
Thank you