Upload custom background image?
Is it possible to upload my own custom background image, instead of a color or gradient (say from my favorite image editing software)? Having this feature would be so great!
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Is it possible to upload my own custom background image, instead of a color or gradient (say from my favorite image editing software)? Having this feature would be so great!
Sure you can, you would need to set the background like shown here: https://getsatisfaction.com/tiggzi/to...
Is it possible to publish a new walkthroug on adding background images? I see that one is a year old...
Cheers,
Hi,
Nothing has changed a lot:
codeAppery('mobilecontainer_name').css('background-image','url("' + Appery.getImagePath('image_name.jpg') + '")'); /code
You can use the code for images, just paste the correct URL. Don't forget to paste correct component names instead of sample.
http://blog.appery.io/2011/10/setting... - we also have this.
Dear Katya:
I tried the code in this Appery GetSatisfaction forum to change the background image (I am running the code found in the forum as custom JS on my first screen on page load):
Appery('mobilecontainer_name').css('background-image','url("' + Appery.getImagePath('image_name.jpg') + '")');
I changed the mobilecontainer to "mobilecontainer1" and the url to the url I uploaded to Appery:
"https://www.dropbox.com/s/eaw37jafpaq..." and the background image that I uploaded did not load upon page load. Thanks for your help!
When I debugged the application I read the following errors:
"Uncaught SyntaxError: Unexpected token <
IMG_0182.PNG:1
Uncaught SyntaxError: Unexpected token < IMG_0183.PNG:1
Uncaught SyntaxError: Unexpected token < IMG_0184.PNG:1
Uncaught SyntaxError: Unexpected token < IMG_0185.PNG:1"
What is the syntax error?
Best,
Brandon
Hi, https://www.dropbox.com/s/eaw37jafpaq... is not the link to img, it's the link to site where img will be shown. As background you need to set path to specific img. On dropbox site try to find link to image, but it's better to upload image to assets - to avoid uploading image from external site each time you load the app.
How do you upload images to assets? The only way I can cause the media manager (assuming that is equivalent to 'asset manager') to appear is by placing an image component on the screen which in testing causes that particular image to appear in that particular place that I placed it, so naturally I removed the component and was excited that the image files I stored in the media manager are still there, but is there a way to access the assets directly or upload assets directly. Also, I tested this code:
"$('div[dsid="mobilecontainer1"]').css('background-image',
'url("IMG_0182.PNG")')"
and still got the same four syntax errors that I started off with. I'm sure that my 'url' should probably include the Appery file directory or something but I started off with just using the file name because of this GetSatisfaction thread: https://getsatisfaction.com/apperyio/....
Thanks for your help.
Please take a look here http://docs.appery.io/javascript-api/.... Let me know if it helps.
Have you figured this out? Could you help me? Marina directed me to the Appery Javascript introduction which hasn't worked out for me.