views:

817

answers:

3

Hi, I have a bit of a problem here:

#foreach($image in $command.lessonLearned.images)

      Image: $image.fileName <input type="submit" onclick="submitForm();setImageToRemove($image.id);setAction('removeImage');" value="REMOVE"/><br/> 
#end

$image.id inside the onclick event is not evaluated as a velocity variable. How do I make it write out the variable content and not just the variable name?

+1  A: 

Try replacing $image.id with ${image.id}

itsadok
A: 

Are you sure that $image.id has a value? Was it $image.ID or $image.getID() that you should have typed?

Nathan Bubna
A: 

Yeah, actually, you were right, Nathan...we found that the problem was a type-o... How typical.

Thanks for your answers, anyway (:

peirix