Click to See Complete Forum and Search --> : How can I change table back ground color - as specified in the text box


shanuragu
09-23-2003, 11:40 PM
Hi

I have a text box, a button & a table. My problem is when I enter a hexadecimal color code in the text box & click the button it should change the table border color accordingly.
can any one help me to solve this problem???:confused:

shara

Fang
09-24-2003, 01:33 AM
you may need to set the width(default is medium) of the border.

<form onsubmit="document.getElementById('idtable').style.border='1px solid '+this.color.value; return false;">
<input id="color" type="text" /><br />
<button type="submit">submit</button>
</form>