cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor

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

0 Kudos

Thanks Jamie.
The problem was in 'Case' of "content"

Answers (2)

Answers (2)

mvaibhav
Contributor
0 Kudos

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

junwu
Active Contributor
0 Kudos

check network tab if there is any error