Skip to Content
0

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

Mar 01 at 01:12 PM

30

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Jamie Cawley
Mar 01 at 02:16 PM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Jun Wu Mar 01 at 01:55 PM
0

check network tab if there is any error

Share
10 |10000 characters needed characters left characters exceeded
Vaibhav Maheshwari Mar 01 at 02:22 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded