sapzero
Goto Top

Tabelle einblenden und ausblenden

Hi,
ich habe hier ein kleines Script gebastelt komme jedoch nicht weiter und brauche Hilfe.
Ich habe ein Auswahlliste mit Anzeige 1 und Anzeige 2. Wenn ich Anzeige 1 auswähle soll die erste Tabelle angezeigt werde und die zweite nicht und bei Anzeige 2 genau das Gegenteil.

<form action="#" method="post">  
<select name="waehlen" size="1">  
      <option value="Anzeige 1" selected="selected">Anzeige 1</option>  
      <option value="Anzeige 2">Anzeige 2</option>  
</select>
<input name="submit" type="submit" value="OK">  
</form>

<?php 

$ok = $_POST['submit'];  
echo $ok."<br>";  
$anzeigen = $_POST['waehlen'];  
echo $anzeigen;

?>
<table style="display:none" border=0 cellspacing=1 cellpadding=1>  
<tr>
	<td>
		<h2>Anzeige 1</h2>
		<img src="1.gif" alt="Bild 2">  
	</td>
</tr>
</table>

<table style="display:none" border=0 cellspacing=1 cellpadding=1>  
<tr>
	<td>
		<h2>Anzeige 2</h2>
		<img src="2.gif" alt="Bild 2">   
	</td>
</tr>
</table>

Ich hoffe jemand hat eine Idee und kann mir weiterhelfen.

MfG
Sapzero

Content-Key: 109788

Url: https://administrator.de/contentid/109788

Printed on: April 18, 2024 at 23:04 o'clock

Member: Sapzero
Sapzero Feb 24, 2009 at 13:41:52 (UTC)
Goto Top
Ok hab schon eine Lösung gefunden.