I'm trying to link to some pictures, dynamically in a html control on my
UA request form.

It is kinda cumbersome I think

I've done 2 things

I put this into the html content on the html control

<div id='imgContainer' align='center'></div>

That gives me a container for my image (or at least it does in firefox,
it doesn't work in IE, which I must look into at some point).

In another control I generate an event when browsing through objects.

In the html control I react on the event with this.

function myFunc () {
var x =(form.getValues("Items"));

if (x.length != 1) {
var encodedURI = encodeURI(form.getValue("Items"));
var imgUrl = "<IMG SRC=
\"" +
encodedURI + String.fromCharCode(38) + "nologin" +
String.fromCharCode(38) + "\"); />";
document.getElementById("imgContainer").innerHTML = imgUrl;
return 0;

Indeed lot of escapes etc etc.
Are there any more "elegant" ways of doing this, and if so, could someone
tell me a smarter way?