cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic image display (based on variable attribute) in Web application?

Former Member
0 Kudos

Hi experts,

I am using a Web Template (from the Web application designer) based on a BEx Query.

This web template displays a logo (jpg image) and the report.

Is there a way to add another image to my web app and having the right logo displayed depending on a characteristic (sales organization for example) chosen in the variable screen (before the first rendering)?

Thanks for your help.

Points will be given to useful answers.

Cheers,

Olivier

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member225306
Active Contributor
0 Kudos

Hi,

Please check the document.

1. Read variable value with javascript (for details see the document).

2. Then, in javascript, according to varible value you can swap images using simple JS command object.src = "your image" when object could be any DIV tag.

Thanks,

Venkat

Former Member
0 Kudos

Thanks for your helpful answers guys.

Andrey's tutorial helped me to catch the sales org variable value in a variable named salesorg (Script Item in the web template as well as Data Provider Info Item).

Now could you explain how/where to use this variable to swith images? Is this still in the same Script_item where i should be able to "hide" / "show" the following XHTML tag?:

<img etc ....... img<

Thanks for your help, I'm a bit confused on this last point (and not so comfortable with Java Script).

Olivier

Edited by: SAP_BW_USER_49 on Nov 23, 2011 3:32 PM

michael_devine
Employee
Employee
0 Kudos

Hi Olivier,

There are 2 possible solutions in this thread: /thread/1820034 [original link is broken]

Regards,

Michael