Try it with uiOutput() and renderUI() and make sure your dynamic HTML is wrapped inside an HTML() function.I'm not sure what you mean by "JavaScript included through tags," but I've successfully included JavaScript as HTML with a "script" tag that it wisely won't let me enter here. If that's what you mean, yep, that works.
Tom