Page 2 of 2

Re: Change page color

Posted: Tue Nov 25, 2014 5:51 pm
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?

Re: Change page color

Posted: Tue Nov 25, 2014 8:24 pm
by AjFromADS
Thanks Scott!

Got it working great!!