Danke für die schnelle Antwort.
Aber Ajax kenne ich nur als Fensterputzmittel.
Ich habe diesen Code aus einer Komponente für Joomla zusammengestohlen.
Und wie gesagt es funktioniert ja -nur eben nicht gleichzeitig im selben Fenster...
Ich poste hier mal den Code:
Leider gibts online noch nichts anzusehen weil ichs erstmal auf einenm Testserver ausprobieren möchte.
class HTML_contxtd {
function displaylist( &$categories, &$rows, $catid, $currentcat=NULL, &$params, $tabclass ) {
global $Itemid, $mosConfig_live_site, $hide_js;
?>
<form action="index.php" method="post" name="adminForm">
<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>">
<tr>
<td>
<?php
if ( count( $rows ) ) {HTML_contxtd::showTable( $params, $rows, $catid, $tabclass );
}
?>
</td>
</tr>
</table>
</form>
<?php
mosHTML::BackButton ( $params, $hide_js );
}
function showTable( &$params, &$rows, $catid, $tabclass ) {
global $mosConfig_live_site, $Itemid;
?>
<table border="0" cellspacing="5" cellpadding="0" align="center"><tr>
<?php
$k = 0;
foreach ($rows as $row)
{
$link = 'index.php?option=com_contxtd&task=view&contact_id='. $row->id .'&Itemid='. $Itemid;
$counter = $counter + 1;
?>
<td width="52" height="72" align="center" valign="middle"><a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>"><img src="<?php echo $mosConfig_live_site;?>/images/stories/<?php echo $row->image; ?>" align="middle" alt="Kontakt" border="1px" title="<?php echo $row->name; ?>, <?php echo $row->con_position; ?>" width="50" height="70" /></a></td>
<?php
if($counter%5 == 0) {
?>
</tr>
<tr>
<?php }
?>
<?php
$k = 1 - $k;
}
?>
<tr>
<td colspan="5">um mehr über ein Mitglied zu erfahren klicke bitte auf eines der Bilder...</td>
</tr>
</table>
<?php
}
function viewcontact( &$contact, &$params, $count, &$list, &$menu_params, $task ) {
global $mosConfig_live_site;
global $mainframe, $Itemid;
$template = $mainframe->getTemplate();
$sitename = $mainframe->getCfg( 'sitename' );
$hide_js = mosGetParam($_REQUEST,'hide_js', 0 );
?>
<script language="JavaScript" type="text/javascript">
<!--
function validate(){
if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
alert( "<?php echo _CONTACT_FORM_NC; ?>" );
} else {
document.emailForm.action = "<?php echo sefRelToAbs("index.php?option=com_contxtd&Itemid=$Itemid"); ?>"
document.emailForm.submit();
}
}
//-->
</script>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table border="0" width="100%">
<tr>
<td>
<?php
HTML_contxtd::_writeContactAddress( $contact, $params );
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
mosHTML::BackButton ( $params, $hide_js );
}
function _writeContactAddress( &$contact, &$params ) {
if ( ( $params->get( 'address_check' ) > 0 ) && ( $contact->address || $contact->suburb || $contact->state || $contact->country || $contact->postcode ) ) {
global $mosConfig_live_site;
?>
<table width="300" cellpadding="0" cellspacing="0" id="teamfenster" >
<tr>
<td colspan="2" height="260" align="center" valign="middle"><img src="<?php echo $mosConfig_live_site;?>/images/stories/<?php echo $contact->image; ?>" align="middle" alt="Contact" /></td>
</tr>
<tr>
<td colspan="2"><div id="teamfensterheading"><?php echo $contact->name; ?></div><hr size="1" color="#000000" /></td>
</tr>
<tr>
<td colspan="2"><?php echo $contact->con_position; ?><br /><br /></td>
</tr>
<tr>
<td align="left">Geburtsdatum:</td>
<td> <?php echo $contact->company; ?></td>
</tr>
<tr>
<td valign="top" width="100" align="left">Adresse:</td>
<td valign="top" align="left"><?php echo $contact->address;?>,<br /><?php echo $contact->postcode;?> <?php echo $contact->suburb;?></td>
</tr>
<tr>
<td align="left">E-Mail:</td>
<td> <?php echo $contact->email;?></td>
</tr>
<tr>
<td align="left">Telefon:</td>
<td><?php echo $contact->telephone1; ?></td>
</tr>
<tr>
<td colspan="2"><br /><?php echo $contact->misc1; ?></td>
</tr>
</table>
<?php
}
}
function nocontact( &$params ) {
mosHTML::BackButton ( $params );
}
}
?>