Skip to Content

​Unable to load Images from Web IDE or any settings missing.

Hi,

I was trying to go through content in Week 1, Session 2 of SAP UI5 learning content in Open SAP.

I was trying to load Images, code is below.

<script> 
sap.ui.getCore().attachInit
(
   function() 
   {
      alert("Test"); 
      var oImage3 = new sap.m.Image(
       {
         src:"https://sapui5.hana.ondemand.com/resources/sap/ui/documentation/sdk/images/logo_ui5.png"
      }
      ).placeAt("Content");
      oImage3.setHeight("400px"); 
   }
)
</script> 

The alert part works fine.

But the image is not getting loaded.

I am using Web IDE and url is https://webide-s0006165701trial.dispatcher.hanatrial.ondemand.com/index.html

Is this a known issue with Web IDE,

Is there a work around to solve this.

Thanks,

Vikas

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 01 at 02:16 PM

    Do you have a body tag with the id of Content?

    <body id="Content"> </body>

    I believe all of the templates in web ide use lowercase for the id...

    <body id="content"> </body>

    Regards,

    Jamie

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01 at 01:55 PM

    check network tab if there is any error

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01 at 02:22 PM

    Hi Vikas,

    Seems like "content" has to be used in place of "Content".

    Check the id of the body tag in your index file.

    Thanks,

    Vaibhav

    Add comment
    10|10000 characters needed characters exceeded