I'm not sure what you mean by adding an image "over a mobile form", but I can answer a way I got an image on a mobile form. I hope it isn't the right way to do it, but I can vouch for it being A way. In this example I wanted to brand a custom login screen.
#1. To start, I added a bean onto my form.
- MobileBeanUse.PNG (6.1 KiB) Viewed 1044 times
#2. In the "innerHTML" property of the bean I named and ID'ed an empty div.
- Code: Select all
<div id="mylogo"></div>
#3. I added a jpeg of the logo to the Servoy media
- Media.PNG (11.82 KiB) Viewed 1044 times
#4. On the onLoad event of the form I used some jquery to add an image element to the empty div.
- Code: Select all
$("#mylogo").html('<img id=adSailsLogo src="../[b]your_mobile_solution_name[/b]/media/adSailsMaster.jpg"></img>')
And the result was this login screen.
- LoginScreen.PNG (31.18 KiB) Viewed 1044 times
As I said, I'm not sure it is the "right way" to do things and certainly it could be easier, but in the end I was able to produce pretty much what I was aiming for. Accessing the Servoy media was not as I expected it to be so I struggled there the most. Hopefully this helps.