The issue you have is caused by the fact that the text which the macro gets expanded to may contain single- and double-quotation marks (' and "), and the way you're using the macro causes JS interpreter errors then, which is why nothing gets displayed.

A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]