Hi,

I am using JSColor script on the admin panel of my web application and I also have an iframe on the same page to preview the changes made to colors. I want the iframe's style update when I change colors using the color picker of JSColor. As this example shows, the following code changes the body background color of the current page.

HTML Code:
onchange="document.getElementsByTagName('body')[0].style.background = '#'+this.color"
How can I modify it so that it will change the background color of the iframe (iframe id is "preview")?