Skip to Content
0
Former Member
Jun 12, 2009 at 07:15 PM

Need to dynamically include an image file when calling a popup window

43 Views

I am working on a web dynpro Java app which uses a button to call a popup window/view. Within the popup, I want to dynamically choose an image to show (from mime types) based on a criteria...there will be multiple buttons on the initial view that all call the same popup, but the popup will have content specific to which button called it (specifically the image embedded in the view).

My question is, what is the proper/best way to do this?

Here are some possible ways I can think of...

1. Pass a parameter from each button during the call of the event, but how does that get sent to the implementation of the second view for use in determining which image? And, how do I modify the source property of the image element based on that parameter?

2. Create multiple pages and views for each button to call...but this seems decidedly un-DRY.

3. Saw one posting on how to dynamically create a cached image...I could use different event handlers in the initial view, then load individual images from the mime library at that point...cache it into a hard-coded image name...then just call the identical view every time. Not sure this is even possible...input?

I don't know specifically how to implement any of these options, or know if there are other/better ways. Any help would be appreciated.