is it possible?
ex. want to insert a date into a table cell...easy with asp/php etc. but want to do this with js...how do i refer to that table cell to show the current date/time?
TIA
manipulating the table cell's data with js...
Moderator: General Moderators
It is. I found a web page that describes this. I tested it on my browser (Safari), and it worked great! That website claims this works in all sorts of browsers. I tested it with this:
I should think you could use the "innerHTML" technique from any Javascript code, and not just the test links I used above.
Code: Select all
<table>
<tr>
<td><span id="cell">One</span></td>
</tr>
</table>
<a href="javascript:document.getElementById('cell').innerHTML='One';">One</a>
<br>
<a href="javascript:document.getElementById('cell').innerHTML='Two';">Two</a>
<br>
<a href="javascript:document.getElementById('cell').innerHTML='Three';">Three</a>