<script language="JavaScript" type="text/javascript">
<!--
$(document).ready(function(){
$('#sb_post').keyup(function() { //Wenn eine Taste im textfeld gedrückt wurde
if($('#sb_post').val().substring(0, 1) == "@" && $("#sb_post").val().length < "8") { // prüfen ob @ das erste zeichen ist und nach 8 zeichen keine prüfung mehr
$.ajax({ // Ajax function
cache: false, // der Browser cache wird geleert (keine alten ergebnisse)
url: 'checkForUser.php?search='+$('#sb_post').val(), //PHP datei wird aufgerufen Inhalt von sb_post wird übergeben
success: function(data) { //wenn Query erfolgreich
$('#sb_dd').html(data); // Ergebniss(e) in DIV schreiben
}
});
$('#sb_dd').fadeIn(); // Menu Einblenden
} else if($('#sb_dd').css('display') == 'block') { // wenn @ gelöscht wird sb_dd wieder ausblenden
$('#sb_dd').fadeOut(); // Menu Ausblenden
}
});
$('#sb_dd ul li').click(function(){ // Wenn ein Name in der liste geklickt wird
$('#sb_post').val('@'+$(this).val()); // name in input schreiben
});
});
function chkFormularShoutBox() {
if(document.getElementById('shoutbox_name').value == ""){
alert('%enter_name%');
document.getElementById('shoutbox_name').focus();
return false;
}
if(document.getElementById('shoutbox_message').value == "" || document.getElementById('shoutbox_message').value == "Message"){
alert('%enter_message%');
document.getElementById('shoutbox_message').focus();
return false;
}
return true;
}
-->
</script>
<form name="shout" method="post" action="index.php?site=shoutbox_content&action=save" onsubmit="return chkFormularShoutBox()">
<script language="JavaScript" type="text/javascript">
<!--
fetch('shoutbox_content.php', 'shoutbox', 'replace', 'time', $refresh);
-->
</script>
<div id="shoutbox" style="width: 100%;overflow: hidden; text-align: left;"></div>
<input type="text" id="shoutbox_name" name="name" size="24" maxlength="255" style="margin: 2px;" $name_settings /><br />
<input type="text" id="shoutbox_message" name="message" size="24" maxlength="255" style="margin: 2px;" value="Message" onfocus="this.value=''" /><br />
<input type="text" value="!!! Testfeld !!!" onfocus="this.value=''" name="Shoutbox_post" id="sb_post" size="24" maxlength="255" style="margin: 2px;"><br /> <!-- Shoutbox Input -->
<div id="sb_dd" style="display:none;"></div> <!-- Div für Anzeige: auswahl von vorschlägen -->
$captcha_form
• <a href="javascript:if(chkFormularShoutBox())+document.shout.submit();">%shout%</a> • <a href="index.php?site=shoutbox_content&action=showall">%all_messages%</a>
</form> |