Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there anyway to create an array of cells that can be referenced 1

Status
Not open for further replies.

robertl

Programmer
Jan 8, 2001
23
GB
I don't think Javascript will let me do this, and with what I know from HTML, I don't think this can be done as well.

I'm wanting to create an array, that will reference cells
in a table created in HTML. (I.E. I would like to be able
to reference the values in the cells second column over and third row down).

The site I'm working on is using VBscript, and I belive I can get what I need working if I crete a vb app, but I heard that creating a link to the server to view the vb app
(I only need the users to view the app) will not work
as each client would need files installed on them.

I would consider changing the script over to javascript if
I could get the same results using javascript and HTML, but
I'm stumped as to how I can reference cells in this manner
(even in HTML and vbscript)

Any suggestions would be appreciated.

 
Okay, this may seem a bit heavy-handed (and jaredn may have already given you an elegant sln, but what about putting a FORM in each cell with a TEXTAREA as its only element? You can ref the FORMS array to ref the cells. A simple JavaScript function could convert (row, col) data into the correct FORM array index. I guess this will only work (if at all) for a static table. Hope this did not sound too crazy.
 
I have a feeling that jaredn's pointer to the article maybe
what I need, I'm just going through the article's sample so I can understand what they're doing with dynamically created tables.

I should have made clear that I'm looking at creating a chart that lists the month as 'mmm' in one header and
the dates of the month as 'dd' in a second header under the month.
There will be x number of employees who will have booked
a holiday for say, Mar 20. The employee, month, date and
year will be stored in a database.

From this database I will call each field and in this HTML??
table, I will display the employee's name to the left side of the table then to correspond to the dates that the
employee requested off, there will be a colour (one for each
employee) that will be shaded in the cell(s) that the employee(s) took off.

I have a feeling the form in each cell would possibly be a little overkill.

I'm thinking of javascript to figure out th month and convert the month to a 'mmm' format and figure out
how many days are in the month which I will then print out as the second header.
I will basically, have to tie in an employee name to a particular month and date in order to shade the background of the cell appropriately.
I think I can get the month and dates accordingly to dynamically create the table, but I have a feeling that
the employee tied into a month and date will be the stumbling block for me.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top