The default is white and I need to change it to a gray.
If you click on your project view on the left hand side and then go down the page and click on the actions tab.
Paste the following:
You’ll have to get the HEX code of the color you want.
I googled this and found a lot of different colors here:
Why does this work?
viewON4 was updated to use HTML5.
By inserting ##$(“body”).css(“background-color”, “ColorYouWant”);## into the scripting section, we are essentially telling the page to change the background color on page load.
You are not limited to just colors as well! You can do animations, custom validation and more using viewon scripts.
Thank you for that info. That was very helpful but can you confirm, does this update it on all views or just the one I add this script to?
This will only update the view you select.
You will need to update each view manually which allows you to use unique colors for each view if desired.
A post was split to a new topic: Updating background by UID, ViewON
This works great, but when I go to test the animation, I only see the background color when I display the ‘default’ view.
Any other selection (Galaxy/iPad/iPhone) still shows a white background, which is problematic because I want to use a dark background and white text.
Any ideas? Thanks!
You can change your view in the view properties.
When I do that, the java code is still there, but the other views still show white background. Maybe i’m missing something?
You are loading this under test animations not on the actual eWON device.
This gives you the ability to use a drop down box to see the size of different views, for example, a tablet or an iphone or Galaxy. It’s just an example and it will not turn white when you actually connect to your device. The java script will still load for that page as intended.
Sounds great, thanks! Still getting my eWon setup today so hopefully will be able to see it work shortly.