Container - Forum

Forum Navigation
You need to log in to create posts and topics.

Container

I wrote into container HTML code....

this html code includes a source of a picture ...  it's work properly in a computer platform ...

but after published as Android, the HTML code missed the picture...

what's wrong here?

 

I'm not expert in Android, but can you share here your HTML code?

This is the html code :

<html>
<head>
</head>
<body>
<img src="D:/myapp/preloader.gif" width="100%">
</body>
</html>

Please do not use absolute paths.
It's very important to use relative paths in order to use our app outside our own computer.
Use this if the image is in the same folder than your app:

<img src="./preloader.gif" width="100%">

 

In this time I used a relative path but also  it does not work, please look up this image:

https://tinyurl.com/y5c3jdef

I'm convinced it's a path problem.
Why are you using

<img src="../preloader.gif" width="100%">

instead of:

<img src="./preloader.gif" width="100%">

Or even (more usually):

<img src="./img/preloader.gif" width="100%">

I'm quite sure Android will block any attempt to access a folder under the app folder.

I try this code also but still it does not work ... and gives the same Error...

I think the VisualNeo web has a problem in the file list.. see this image..

https://tinyurl.com/y3xhhe2s

 

 

Have you added the image as an Image object?
If not, have you added the image to Project->Properties->Libraries/Files?

Manually added images to the app folder will not be considered by VisualNEO Web.

Is it possible for you to make a sample for me about this topic?

Take a look at the attached sample.
I know it's a bit difficult to understand where are the files when editing, running or compiling the app.
Normally VisualNEO Web takes care of the files automatically but it can't when they are in HTML.
I hope it helps.

There is a better solution using a variable to store the src parameter of an image object and then use it inside the HTML code:

<img src="[imgSrc]">

Best regards.

 

Uploaded files:
  • You need to login to have access to uploads.
asmat has reacted to this post.
asmat

I got it, thank you so much ....

luishp and asmat have reacted to this post.
luishpasmat

Hello. I'm trying to use this same method used in the example to use an embedded jpg file as background-image. In the CSS field of the page I type "./img/myfile.jpg", with and without quotation marks. Also with url('....'), but is not working. How can I do it?

@fmorales please take a look at the attached sample. It uses the exact same method to set the image as the page background-image. Regards.

Uploaded files:
  • You need to login to have access to uploads.

Your example is working, but there are two files included in the app folder:

main.js

style.css

When I compile I don't get that files. I don't know what I'm missing. Without this two files the background doesn't appear.

You just need to be sure your image is on the "./img" folder in run-time. At compile time VisualNEO Web will copy the file in the appropiate folder automaticaly.