For one, you should fix the Shift/Caps Lock key on your keyboard, BECAUSE TYPING A POST IN ALL CAPS IS LIKE SHOUTING, which is quite rude. You might want to look into a spell-checker or two as well.
For your actual issue, what does the output of that code look like if you view the source in your browser? Assuming that the PHP variable exists and has data (do you even check for this?), note that your Javascript (which, by the way, is not the same as Java) would look something like this:
document.getElementById('element').src ='foobar';+id;
Notice the syntax error? (Hint: You've got an extra semicolon in there that doesn't belong.)