Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Nov 23, 2011 at 12:06 PM

    Hi Olivier,

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

    Regards,

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2011 at 12:19 PM

    Hi,

    Please check the document.

    How to read Bex variable value with JavaScript within WAD

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.