Hi,
I made a pop-up with a colour palette in which users can select a color. The color code is then 'sent' back to the main page in a text field of a form.
This is the script I used:
the pop-up:
function r(hval)
{
opener.document.formname.fieldname.value=hval;
self.close();
}
the main page:
<FORM NAME="formname" action="action.php" method="POST">
<input type="text" name="fieldname" value="">
</form>
But now I want the selected color to be the background color of a table instead of the color code in the textfield.
To make it the background color of the whole page i can use opener.document.bgColor but I couldn't find the right piece of javascript for only the background color of a table or cel.
Could anyone help me with this?
Thanking you in advance,
ruben.
I made a pop-up with a colour palette in which users can select a color. The color code is then 'sent' back to the main page in a text field of a form.
This is the script I used:
the pop-up:
function r(hval)
{
opener.document.formname.fieldname.value=hval;
self.close();
}
the main page:
<FORM NAME="formname" action="action.php" method="POST">
<input type="text" name="fieldname" value="">
</form>
But now I want the selected color to be the background color of a table instead of the color code in the textfield.
To make it the background color of the whole page i can use opener.document.bgColor but I couldn't find the right piece of javascript for only the background color of a table or cel.
Could anyone help me with this?
Thanking you in advance,
ruben.