<td id="DateID" align="Left" valign="Top">2/29/2004</td> <script language='javascript'> function GetCellStuff() { var cellTxt=document.getElementById('DateID'); // return false to prevent server control post back alert('The property is: ' + cellTxt.id); return false; } </script>Thank you,
>//Get reference to table. >var Table = document.getElementById('ForecastEditor_tblForecasts'); > >//Get reference to table body. >var TableBody = Table.firstChild; > >//Create the new elements >var NewRow = document.createElement("tr"); >var ActionsCell = document.createElement("td"); >var StartDateCell = document.createElement("td"); >var StartDateTextbox = document.createElement("input"); >var EndDateCell = document.createElement("td"); >var EndDateTextbox = document.createElement("input"); >var ValueCell = document.createElement("td"); >var ValueTextbox = document.createElement("input"); > >//Add textboxes to cells >StartDateCell.appendChild(StartDateTextbox); >EndDateCell.appendChild(EndDateTextbox); >ValueCell.appendChild(ValueTextbox); > >//Add elements to row. >NewRow.appendChild(ActionsCell); >NewRow.appendChild(StartDateCell); >NewRow.appendChild(EndDateCell); >NewRow.appendChild(ValueCell); > >//Add row to table >TableBody.appendChild(NewRow); >>
><html> ><head> ><script language="javascript"> >var highliteColor = "#3366cc"; > >function toggleColor(element){ > if(element.style.backgroundColor == highliteColor){ > element.style.backgroundColor = element.sourceColor; > } > else{ > element.sourceColor = element.style.backgroundColor; > element.style.backgroundColor = highliteColor; > } >} ></script> ></head> ><body> ><table border="0" cellpadding="3" cellspacing="1" bgColor="#000000"> ><tr> ><td style="background-color:#ffffff" onclick="toggleColor(this)">Hello</td> ><td style="background-color:#cccccc" onclick="toggleColor(this)">World</td> ></tr> ></body></html> >>
>>this.Table1.Row[0].Cells[0].Text = "my cell text" ; >>>>
>>this.Table1.Row[0].Cells[0].BackColor=Color.Yellow; >>>>