on 03-01-2018 1:12 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check network tab if there is any error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.