Page 1 of 1
Use images in html code
Posted: Fri Aug 24, 2018 2:58 am
by otlik
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
Re: Use images in html code
Posted: Fri Aug 24, 2018 6:05 am
by HPW
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
Re: Use images in html code
Posted: Fri Aug 24, 2018 11:56 pm
by luishp
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.
Re: Use images in html code
Posted: Wed Aug 29, 2018 3:20 am
by otlik
Thanks!