Rylander
12-01-2003, 04:47 PM
Hello! I am a newbie at using javascript and I would love some help!
There is a slight snippet of a code I was wondering if you could help me decipher.. Below is something I just dont get.. What types of objects does this code refer to and what will be the result? I understand the 'thought' behind the code, but what do the lines mean? What do each line do?
I realise you guys must get these crappy questions all the time, and I more than understand if you dont wish to waste your time on it, but for all its worth - thank you for your time.
Anyway, here is the code!
function something_a(b) {
var s = document.f.s.value;
if (s != "") {
document[b].src = s;
}
}
PLEASE: If you do find time to help me with this, I would be *very* happy if you would email me, but it is of course not necessary since I have email notification... just a thought. Never mind... I am confused.
Cheers!
/ Andreas.
There is a slight snippet of a code I was wondering if you could help me decipher.. Below is something I just dont get.. What types of objects does this code refer to and what will be the result? I understand the 'thought' behind the code, but what do the lines mean? What do each line do?
I realise you guys must get these crappy questions all the time, and I more than understand if you dont wish to waste your time on it, but for all its worth - thank you for your time.
Anyway, here is the code!
function something_a(b) {
var s = document.f.s.value;
if (s != "") {
document[b].src = s;
}
}
PLEASE: If you do find time to help me with this, I would be *very* happy if you would email me, but it is of course not necessary since I have email notification... just a thought. Never mind... I am confused.
Cheers!
/ Andreas.