ich möchte gerne den inhalt NUR den inhalt der Shoutbox alle 60 Sekunden aktualisieren. Das heißt das sich auch nicht das textfeld aktualisieen darf in welches ch grade schreibe.
Mit diesem Code aktualisiere ich ein iframe, seite naja alles eigentlich und das ist mein Problem:
<script type="text/javascript"> <!-- window.setTimeout('location.reload()',60000); //--> </script>
Es soll nur der Teil aktualisiert werden wo die Einträge zusehen sind. Wie mach ich das am besten?
Hier mein Shoutbox Code:
<?php // Copyright by Manuel // Support www.ilch.de defined ('main') or die ('no direct access'); if (loggedin()) { $shoutbox_VALUE_name = $_SESSION['authname']; } else { $shoutbox_VALUE_name = 'Nickname'; } if (has_right($allgAr['sb_recht'])) { if (!empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) { $shoutbox_nickname = escape($_POST['shoutbox_nickname'], 'string'); $shoutbox_nickname = substr($shoutbox_nickname, 0, 15); $shoutbox_textarea = escape($_POST['shoutbox_textarea'], 'textarea'); $shoutbox_textarea = preg_replace("/\[.?(url|b|i|u|img|code|quote)[^\]]*?\]/i", "", $shoutbox_textarea); $shoutbox_textarea = strip_tags($shoutbox_textarea); if (!empty($shoutbox_nickname) AND !empty($shoutbox_textarea)) { db_query('INSERT INTO `prefix_shoutbox` (`nickname`,`textarea`) VALUES ( "' . $shoutbox_nickname . '" , "' . $shoutbox_textarea . '" ) '); } } echo '<div id="sh_bg">'; $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT ' . (is_numeric($allgAr['sb_limit'])?$allgAr['sb_limit']:5)); while ($row = db_fetch_object($erg)) { echo '<span class="sh_name">' . $row->nickname . ':</span> ' . preg_replace('/([^\s]{' . $allgAr['sb_maxwordlength'] . '})(?=[^\s])/', "$1\n", $row->textarea) .''; echo '<hr class="sh_hr" />'; } echo ' <form action="index.php?' . $menu->get_complete() . '" method="POST"> '; echo ' <input type="text" size="15" id="sh_nameinput" name="shoutbox_nickname" value="' . $shoutbox_VALUE_name . '" onFocus="if (value == \'' . $shoutbox_VALUE_name . '\') {value = \'\'}" onBlur="if (value == \'\') {value = \'' . $shoutbox_VALUE_name . '\'}" maxlength="15">'; echo ' <textarea id="sh_textarea" rows="2" cols="2" name="shoutbox_textarea"></textarea>'; $antispam = get_antispam ('shoutbox', 0); echo $antispam; if (!empty($antispam)) { echo '<br />'; } echo ' <input id="sh_sub" type="submit" value="ABSENDEN" name="shoutbox_submit" />'; echo '<div class="sh_archiv"><a class="sh_archiv" href="index.php?shoutbox">' . $lang['archiv'] . '</a></div>'; echo ' </form>'; } echo ' <br clear="all" />'; echo ' </div>'; ?>
betroffene Homepage: externer Link