Adding an Media to Mobile Form

Home for older / inactive topics

Adding an Media to Mobile Form

Postby ars » Thu Mar 06, 2014 6:02 pm

Hi,

I am wondering how to add an media image over a Mobile form. Anyone has any idea on the same, please share.

Thanks!!
Arup Sahoo

Servoy Developer and Consultant

Find me @ arup.sahooATgmail.com
Skype me @ arup.sahoo
GTalk me @ arup.sahoo
User avatar
ars
 
Posts: 213
Joined: Thu Jun 28, 2007 2:04 pm
Location: India

Re: Adding an Media to Mobile Form

Postby mattfrizzell » Tue Mar 11, 2014 5:57 pm

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
MobileBeanUse.PNG (6.1 KiB) Viewed 988 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
Media.PNG (11.82 KiB) Viewed 988 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
LoginScreen.PNG (31.18 KiB) Viewed 988 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.
Matt Frizzell
adBlocks
www.adblocks.com
mattfrizzell
 
Posts: 51
Joined: Mon Aug 21, 2006 4:00 pm


Return to Archive

Who is online

Users browsing this forum: No registered users and 4 guests