Page 1 of 2

Upload custom background image?

Posted: Thu Mar 08, 2012 1:39 pm
by Jgc

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!


Upload custom background image?

Posted: Thu Mar 08, 2012 5:54 pm
by maxkatz

Sure you can, you would need to set the background like shown here: https://getsatisfaction.com/tiggzi/to...


Upload custom background image?

Posted: Tue Jun 11, 2013 11:03 am
by Effektor

Is it possible to publish a new walkthroug on adding background images? I see that one is a year old...

Cheers,


Upload custom background image?

Posted: Tue Jun 11, 2013 11:46 am
by Kateryna Grynko

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.


Upload custom background image?

Posted: Tue Jun 11, 2013 11:50 am
by Kateryna Grynko

Upload custom background image?

Posted: Wed Jun 26, 2013 6:26 am
by Brandon Scott Barney5989131

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


Upload custom background image?

Posted: Wed Jun 26, 2013 3:51 pm
by Maryna Brodina

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.


Upload custom background image?

Posted: Wed Jun 26, 2013 4:24 pm
by Brandon Scott Barney5989131

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.


Upload custom background image?

Posted: Wed Jun 26, 2013 4:31 pm
by Maryna Brodina

Please take a look here http://docs.appery.io/javascript-api/.... Let me know if it helps.


Upload custom background image?

Posted: Wed Jun 26, 2013 11:34 pm
by Brandon Scott Barney5989131

Have you figured this out? Could you help me? Marina directed me to the Appery Javascript introduction which hasn't worked out for me.