Thread: image captions
View Single Post
Old 11-16-2012, 02:46 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Oh...and there won't be any error message.

It's perfectly legal to do
Code:
document.getElementById("imageCaption").innerHTML = make+model;
Just that neither make nor model will be defined.

(And they woudn't be even if you DID pass three values when you called the function. Do you see why? HINT: JavaScript is CASE SENSITIVE.)
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote