help with an error - very short code

J

janice

Hi all,

Can someone tell me why this won't work? (I get a
"document.images.whichpic is null or not an object" message.)

-----

var numbeads = 0;

function addABead(whichbead, w, h) {

var whichpic = "pic" + numbeads;

document.images.whichpic.src = whichbead;
document.images.whichpic.width = w;
document.images.whichpic.height = h;

numbeads += 1;

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top