Een tablen breeder, en minder breed maken
Weet iemand hoe je een table breeder kan maken, door dat mensen op een afbeelding klikken ?
(voorbeeld code:)
Code (php)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
<table width="800" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#00CC33">
<tr>
<td><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a onClick="maak de tabel breeder" href="javascript:;"><img src="/images/smaller.png" width="20" height="20" border="0"></a></td>
<td><a href="javascript:;"><img src="/images/bigger.png" width="20" height="20" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<tr>
<td><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a onClick="maak de tabel breeder" href="javascript:;"><img src="/images/smaller.png" width="20" height="20" border="0"></a></td>
<td><a href="javascript:;"><img src="/images/bigger.png" width="20" height="20" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
Code (php)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
<table width="800" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#00CC33" id="table">
<tr>
<td><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a onClick="maak de tabel breeder" href="javascript:;"><img src="/images/smaller.png" width="20" height="20" border="0"></a></td>
<td><a href="javascript:document.getElementById(\"table\").style.width= \"1200\";"><img src="/images/bigger.png" width="20" height="20" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<tr>
<td><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a onClick="maak de tabel breeder" href="javascript:;"><img src="/images/smaller.png" width="20" height="20" border="0"></a></td>
<td><a href="javascript:document.getElementById(\"table\").style.width= \"1200\";"><img src="/images/bigger.png" width="20" height="20" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
thnx !
dit werkt wel:
Code (php)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
<table id="main" width="800" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#00CC33">
<tr>
<td><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a onClick="id:main.width='800';" href="javascript:;"><img src="/images/smaller.png" width="20" height="20" border="0"></a></td>
<td><a onClick="id:main.width='90%';" href="javascript:;"><img src="/images/bigger.png" width="20" height="20" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<tr>
<td><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a onClick="id:main.width='800';" href="javascript:;"><img src="/images/smaller.png" width="20" height="20" border="0"></a></td>
<td><a onClick="id:main.width='90%';" href="javascript:;"><img src="/images/bigger.png" width="20" height="20" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
Gewijzigd op 01/01/1970 01:00:00 door J orii
En wat voor JS foutmelding krijg je :)?
Ongeldig teken