OK, everyone… I’m brand new to this forum, but here’s my big question:
What is the appropriate syntax for what I’m trying to do?
[CODE]document.[“form” + i].item_number.value = [clientID + i];
This is an excerpt from a for loop where i = 12. I have 12 forms that I’m addressing. I need to give each form’s item_number an increasing value as well. I’m making a Paypal shopping cart.
Here’s the whole function. Everything works except the last line. Any ideas on the correct syntax, guys?
[CODE]
var clientID = “bassett”
function preloadImages() {
for(var i = 1; i <= 12; i++)
{
window[clientID + i] = new Image();
window[clientID + i].src = [“../client_proofs/” + clientID + “/” + clientID + i + “.jpg”]
window[clientID + “_thumb” + i] = new Image();
window[clientID + “_thumb” + i].src = [“../client_proofs/” + clientID + “/” + clientID + “_thumb” + i + “.jpg”]
document.[“form” + i].item_number.value = [clientID + i];
}
}
I’ve been trying to figure this out for over 3 hours now! Thanks in advance!