Programming question

H

Hermione

Hi,

I have a ASP page:

Table with 5 columns:

First column I have:
Student
Addresse
Class

I want when the user clik in the values in the column -1 the name of the
value will appear in column - 5.

Exemple: user click on Student: ==> the value Student will appear in Column
- 5

so I will have : You are in the section of student

Any help please

I tried with asp: I declare 3 variables and I affect the string (Student,
Address, Class) to the variable and a variable that I put in the column -5 ,
and on the onclick I put the variable = on selected
 
M

MD Websunlimited

Hi Hermione,

Use JavaScript instead to accomplish, example,

<table border="1" width="100%" id="table1">
<tr>
<td width="266" onclick="debugger; document.getElementById('col5').innerText = this.innerText">This is a test</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="col5">&nbsp;</td>
</tr>
</table>

When you click on column one of row one it will set col5 of row one to the value of column one row one. The above used DHTML and
JavaScript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top