You are here: irt.org | FAQ | JavaScript | Table | Q1106 [ previous next ]
In Internet Explorer 4 you may get the innerText of a tag, but if you want this to be compatible, simply write the table with JavaScript (watch the quotes):
<script language="JavaScript"> Loc = 'http.//www.server.com/cgi-bin/somecgi.pl'; tRow = new Array(); tRow[0] = 'value1'; tRow[1] = 'value2'; tRow[2] = 'value3'; tRow[3] = 'value4'; text = '<form><table>'; for (i=0,n=tRows.length; i<n; i++) { text += '<tr>'; text += ' <td>'; text += ' <input type="button" value=" '+i+' " onClick="location =\''+ Loc + '?' + tRow[i] + '\';">'; text += ' </td>'; text += ' <td>'+tRow[i]+'</td>'; text += '</tr>'; } text += '<\/table><\/form>'; document.write(Text); //--></script>