Hmmm... Emily, that doesn't explain why the image would appear for an instant before changing. Unless what he's seeing for that instant isn't the proper image, but is a temporary placeholder?
Mark, to clarify... when you set the "image source", unless it starts with http:// (or https://) it is treated as a "relative URL". Which means it is based on the base document.
So if you're in a browser and connecting to
http://mysystem/profoundui/start and the image source is set to "test/image.png" then it will use a URL of
http://mysystem/profoundui/start/test/image.png". Or if you used "/test/image.png" it would use a URL of "
http://mysystem/test/image.png". In that respect, it is no different from a URL that you code in HTML with the <img src="the-url"> tag.
But, when you are using the Profound UI mobile client (or a client you generate yourself with PhoneGap) the base URL is actually the location where the app is stored on your mobile device. The initial "page" you display is not on your IBM i, instead it is that page where you can select the system to connect to, and that page is running off of the local device's filesystem. So the URL would also be assumed to be coming from the local device's file system. Occasionally that might be what you want (you might load the images on the device to improve performance) but most of the time it's not.
You could fix it by hard-coding
http://yoursystem/ into the URLs, but that is obviously not ideal either, since you may decide to move your application to a different server or instance in which case you'd have to change every URL in every program, so... yuck.
That is why we provile the pui.normalizeURL() javascript routine. It is a JavaScript API that prepends the current IBM i hostname into the URL so that it will retrieve the file from your IBM i rather than trying to get it from the device's filesystem. Since you're calling this API each time, it does not need to be hard-coded in every URL, so your application can be moved without errors.
Apologies if that is long-winded, but sometimes it's good to know how things work.
Anyway, if that is the problem, you wouldn't ever see the proper image (not even for an instant) because it'd never be able to retrieve it. On the other hand, if what you're seeing for an instant isn't your actual image, but just a generic placeholder that the browser shows while it is waiting for the image to download, then it would make perfect sense.