Use images in html code

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Locked
otlik
Posts: 6
Joined: Fri Aug 17, 2018 1:44 am

Use images in html code

Post by otlik » Fri Aug 24, 2018 2:58 am

Hello again!

Can you tell me how can I use local pictures in HTML img? I try this in my saved project root but it isn't working <img src="img/1.jpg" alt>
And can I add a value to NAB variable from html checkbox click?

Thanks, and sorry for the beginner questions, just I not found a tutorial or anything.

Peter

User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Use images in html code

Post by HPW » Fri Aug 24, 2018 6:05 am

Hello,

When I place the neoappbuilder img-object on the form I get a file selector to browse to my file.
When I compile it then the file gets copied into a img subfolder of my web-path.
The html code gets generated with the needed img tag.

So how do you place your Image?

Edit: The generated tag Looks like this

Code: Select all

<img id="Image1" alt="" ng-src="img/220651.png" class="[NAB.Image1_effect]" ng-style="NAB.Image1_style" ng-hide="NAB.Image1_hidden" ng-disabled="NAB.Image1_disabled">

Regards
Hans-Peter

User avatar
luishp
Posts: 410
Joined: Wed May 23, 2007 10:17 am
Location: Spain
Contact:

Re: Use images in html code

Post by luishp » Fri Aug 24, 2018 11:56 pm

Hi!,

You have two different ways to add any kind of content to your App:

1) Use the built-in NeoAppbuilder objects.
2) Use your own HTML code inside a Container object.

If you use NeoAppBuilder objects (as Hans suggest), the software will manage the files you need, including images. So, no matter where they are, they will be atomatically copied to the corresponding folder: "img" in this case.
If you decide to use your own HTML code, then you must be sure every file will be where it must be. Your tag is correct but probably the image "1.jpg" is not inside the folder "img".
And can I add a value to NAB variable from html checkbox click?
Yes, but it is fairly more simple to use the "Checkbox Object" and its properties than using plain HTML because it would involve some JavaScript.
A "Checkbox Object" value is already stored into a variable. You don't have to do anything.

By the way. This forum is about to be closed.
Please, consider using https://community.visualneo.com instead.

Regards.
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com

otlik
Posts: 6
Joined: Fri Aug 17, 2018 1:44 am

Re: Use images in html code

Post by otlik » Wed Aug 29, 2018 3:20 am

Thanks!

Locked