HI Arvind,
well as I understand you want to set the input (Form element) "in_backgroundColor" value as same as div "pageSurround's" background color or javascript variable "color", if I am right then you can add these Lines in setColor function
var inputName = document.getElementById("in_backgroundColor");
inputName.value = color; or
document.formName.in_backgroundColor.value = color; now function setColor shoud look like
function setColor(color) {
var inp = document.getElementById("pageSurround");
inp.style.backgroundColor = color;
var inputName = document.getElementById("in_backgroundColor");
inputName.value = color;
} or
function setColor(color) {
var inp = document.getElementById("pageSurround");
inp.style.backgroundColor = color;
document.formName.in_backgroundColor.value = color;
}
Hope this will help you
Rahul Dev Katarey