Change page color

Use this board to ask questions or have discussions with other Rich Displays users.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Change page color

Post by Scott Klement »

I see... I didn't run into this when I did a quick test, but... I wonder if it's because it's inside the main "pui" (or "5250" in Genie) element which has no fixed height or width.

Hmmm... I guess another approach might be to do this with JavaScript. You could have JavaScript that loads when the screen is displayed that changes the background.... and then you could change it back when the screen is submitted back to the RPG program. Would that work for you?

This is off the top of my head, I didn't try it... but you'd do this:

In the screens 'onload' event, run this code:

Code: Select all

document.body.style.backgroundColor="#00FF00";
Then in the screen's "onsubmit" event, remove the background color:

Code: Select all

document.body.style.backgroundColor="";
When the screen is shown, it should change the color to whatever you put here -- and when it's submitted back to the RPG program, it should remove that color... will that work?
AjFromADS
New User
Posts: 11
Joined: Wed Sep 03, 2014 4:20 pm
First Name: Aj
Last Name: Flint
Company Name: Advanced Data Systems
Contact:

Re: Change page color

Post by AjFromADS »

Thanks Scott!

Got it working great!!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest