Hi Michael, I didn't want to screw things up with the complete code, because I thought it is a pretty simple thing :-)
So here is the whole code: (I haven't a live page, it is only on my local machine) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" / > <title>Werbetrommel</title> <link rel="stylesheet" type="text/css" href="http:// yui.yahooapis.com/2.5.2/build/reset-fonts-grids/reset-fonts- grids.css"> <link rel="stylesheet" type="text/css" href="http:// yui.yahooapis.com/2.5.2/build/base/base-min.css"> <link rel="stylesheet" type="text/css" href="css/master.css"> <script type="text/javascript" src="js/jquery-1.2.6.pack.js"></ script> <script type="text/javascript"> {literal} $(document).ready(function() { $('.customer').hide(); $("h1").click(function() { $(this).next().slideToggle(); }); $('#displayAll').click(function() { $('.customer').each(function() { $(this).show(); }); return false; }); $('#displayNone').click(function() { $('.customer').each(function() { $(this).hide(); }); return false; }); // Make Favorite $('.makeFavorite').click(function() { var id = this.id; var favimg = "favorites"; $.ajax({ type: "POST", url: "make_favorite.php", data: "id=" + $(this.id), success: function(msg) { alert('Data saved: ' + msg); $('h1 a#'+id+' img').attr({src : "images/"+favimg+".png"}); } }); return false; }); }); {/literal} </script> </head> <body> <div id="wrapper"> <div id="header"> <img src="/images/core/logo.png" width="" height="" title="" alt="" /> <div id="searchRow"> <form action="" id="searchBox" method="post"> <input type="text" /> </form> </div> <div id="alphabetRow"> <ul> <li>a</li> <li>b</li> <li>y</li> <li>z</li> </ul> </div> <div id="addRow"> <img src="images/add.png" width="32" height="32" title="Neuen Interessenten hinzufügen" alt="Hinzufügen" /> </div> </div><!-- end #header --> <div id="listing"> <div id="control"> <a href="#" id="displayAll" title="Alle User vollständig einblenden">Alle einblenden</a> - <a href="#" id="displayNone" title="Alle User ausbenden">Alle ausblenden</a> </div> {foreach from=$eintrag item=inhalt} <h1>{$inhalt.firma} <a href="{$inhalt.id}" class="makeFavorite" id="{$inhalt.id}" title="Als Favorit speichern"><img src="images/{if $inhalt.favorit == 1}favorites.png{else}favorites2.png{/if}" width="16" height="16" alt="" /></a></h1> <div id="customer_{$inhalt.id}" class="customer"> <div class="user"> <h2>Empfänger</h2> <p>{$inhalt.name}</p> <p>{$inhalt.adresse|nl2br}</p> <p>{$inhalt.email}<br /><a href="{$inhalt.website}" title="{$inhalt.website}">{$inhalt.website}</a></p> </div><!-- end .user --> <div class="mailing"> <h2>Mailing</h2> <p>Wurf: {$inhalt.wurf}<br />Mailing: {$inhalt.mailing}</p> <h2 class="seccond">Zeitpunkte</h2> <p>Gesendet I: {$inhalt.gesendet_1}<br />Gesendet II: {$inhalt.gesendet_2}<br />Gesendet III: {$inhalt.gesendet_3}</p> </div><!-- end .mailing --> <div class="status"> <h2>Status</h2> <p>Status: {$inhalt.status}<br />FI: {$inhalt.feuer_index}</p> </div><!-- end .status --> <div class="feedback"> <h2>Feedback</h2> <p>1. Kontakt: {$inhalt.erstkontakt}<br />1. Kontakt Typ: {$inhalt.erstkontakt_typ}<br />Termin: {$inhalt.termin}<br / >Interessiert an: {$inhalt.interessiert_an}</p> <h2 class="seccond">Infos</h2> <p>Mängel/Vorschläge<br />Kommentar</p> </div><!-- end .feedback --> <div class="options"> <img src="images/delete.png" width="32" height="32" title="Diesen User löschen" alt="Löschen" /><br /><a href="bearbeiten.php?id={$inhalt.id}" title="{$inhalt.firma} bearbeiten"><img src="images/edit.png" width="32" height="32" title="{$inhalt.firma} bearbeiten" alt="Bearbeiten" /></a> </div><!-- end .options --><br style="clear:both" /> </div><!-- end .customer --> {/foreach} </div> </div><!-- end #wrapper --> </body> </html> ----------------------------------------------------------------------------------- Everything between {} is Smarty, for those who don't know. smarty.net