Click to See Complete Forum and Search --> : change the backgroundcolor of a table column


verschha
06-08-2003, 04:58 PM
I want to change the backgroundcolor of a table column by clicking on the columnheader, and by clicking it again the backgroundcolor should change back to the original color.

Since this table is part of a form, on submitting the form I would like to know what color the column has.

Can somebody help me?

verschha
06-09-2003, 05:50 AM
Thanks very much for your response, this is almost what I was looking for, but not exactly. In this example you can only 'highlight' one column because when you click on another one, the first one is not highlighted anymore.

And then there is the other part of my question. On submitting the form, I would like to know what color each column has? Or more precise, the column headers represent days, and they can be open or closed, so I would like to know which days are open and which are closed.

I think I have to make a hidden input fields for each day, and on clicking the column header, the value for that particular hidden input field has to change from 'open' to 'closed'. Is this the rigth approach, or is there another way?

verschha
06-09-2003, 12:19 PM
Thanks very much for your help, it's working now the way I intended.

You're absolutly right about the intention of this site, but since I'm a VB programmer, and did not have any experience with the javascript syntax, I tried already after your first response to modify it to my needs, but all I got were errors (I forgot a closing '}').

Anyway, now it's working, and your suggestion to use the FORM's onSubmit event does the job.

About your last comment, indeed we thought about that. We are only using javasript in a restricted part of the site, and all users use browsers that can deal with javascript.

Thanks again for the time...

Hans