Nieuw lid |
|
<script language="JavaScript">
function smile (code){
document.form.content.value = document.form.content.value + code;
document.form.content.focus();
}
</script>
<?PHP
if(!IsSet($_POST['submit']))
{
echo "<Form Method='POST' Action='index.php?page=postcomment'>";
echo "Nick: ";
echo "<input type='text' name='poster' class='body'>";
echo "<br><br>";
echo "<Input Type='BUTTON' Name='[b][/b]' Value='[b][/b]' style='width: 50px;' onClick='javascript: smile(\"[b][/b]\");'>";
echo "<Input Type='BUTTON' Name='[u][/u]' Value='[u][/u]' style='width: 50px;' onClick='javascript: smile(\"[u][/u]\");'>";
echo "<Input Type='BUTTON' Name='[i][/i]' Value='[i][/i]' style='width: 50px;' onClick='javascript: smile(\"[i][/i]\");'>";
echo "<Input Type='BUTTON' Name='[email][/email]' Value='[email][/email]' style='width: 48px;' onClick='javascript: smile(\"[email][/email]\");'>";
echo "<Input Type='BUTTON' Name='[url][/url]' Value='[url][/url]' style='width: 60px;' onClick='javascript: smile(\"[url][/url]\");'>";
echo "<br><br>";
echo "<IMG Src='".$img['smiles']."/icon_arrow.gif' onClick='javascript: smile(\":arrow:\")'>";
echo "<IMG Src='".$img['smiles']."/icon_biggrin.gif' onClick='javascript: smile(\":D\");'>";
echo "<IMG Src='".$img['smiles']."/icon_confused.gif' onClick='javascript: smile(\":S\");'>";
echo "<IMG Src='".$img['smiles']."/icon_cool.gif' onClick='javascript: smile(\"8)\");'>";
echo "<IMG Src='".$img['smiles']."/icon_cry.gif' onClick='javascript: smile(\":*(\");'>";
echo "<IMG Src='".$img['smiles']."/icon_eek.gif' onClick='javascript: smile(\":shock:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_evil.gif' onClick='javascript: smile(\":evil:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_exclaim.gif' onClick='javascript: smile(\":!:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_frown.gif' onClick='javascript: smile(\"^:(\");'>";
echo "<IMG Src='".$img['smiles']."/icon_lol.gif' onClick='javascript: smile(\":lol:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_mad.gif' onClick='javascript: smile(\":x\");'>";
echo "<br>";
echo "<IMG Src='".$img['smiles']."/icon_mrgreen.gif' onClick='javascript: smile(\":mrgreen:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_neutral.gif' onClick='javascript: smile(\":|\");'>";
echo "<IMG Src='".$img['smiles']."/icon_question.gif' onClick='javascript: smile(\":?:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_razz.gif' onClick='javascript: smile(\":P\");'>";
echo "<IMG Src='".$img['smiles']."/icon_redface.gif' onClick='javascript: smile(\":oops:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_rolleyes.gif' onClick='javascript: smile(\":roll:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_sad.gif' onClick='javascript: smile(\":(\");'>";
echo "<IMG Src='".$img['smiles']."/icon_smile.gif' onClick='javascript: smile(\":)\");'>";
echo "<IMG Src='".$img['smiles']."/icon_surprised.gif' onClick='javascript: smile(\":o\");'>";
echo "<IMG Src='".$img['smiles']."/icon_twisted.gif' onClick='javascript: smile(\":twisted:\");'>";
echo "<IMG Src='".$img['smiles']."/icon_wink.gif' onClick='javascript: smile(\":wink:\");'>";
echo "</Center>";
echo "<br><br>Bericht: ";
echo "<Textarea Name='content' style='width: 350px; height: 150px;'>";
echo "</Textarea>";
echo "<Input Type='SUBMIT' Name='submit' Value='Submit!' style='width: 100px; margin-left: 25px;'margin-right: 25px;'>";
echo "<input type='hidden' name='date' value='date('d-m-y H:i')'>";
echo "<input type='hidden' name='nid' value='".$nid."'>";
echo "<input type='submit' name='submit' value='Submit'>";
} else
{
if(!IsSet($_POST['poster']) || empty($_POST['poster']))
{
echo "Error!- Geen naam ingevuld!";
} else if(!IsSet($_POST['content']) || empty($_POST['content']))
{
echo "Error!- You have to type a message!";
}
}
<script language="JavaScript"> function smile (code){ document.form.content.value = document.form.content.value + code; document.form.content.focus(); } </script> <?PHP if(!IsSet($_POST['submit'])) { echo "<Form Method='POST' Action='index.php?page=postcomment'>"; echo "<input type='text' name='poster' class='body'>"; echo "<Input Type='BUTTON' Name='[b][/b]' Value='[b][/b]' style='width: 50px;' onClick='javascript: smile(\"[b][/b]\");'>"; echo "<Input Type='BUTTON' Name='[u][/u]' Value='[u][/u]' style='width: 50px;' onClick='javascript: smile(\"[u][/u]\");'>"; echo "<Input Type='BUTTON' Name='[i][/i]' Value='[i][/i]' style='width: 50px;' onClick='javascript: smile(\"[i][/i]\");'>"; echo "<Input Type='BUTTON' Name='[email][/email]' Value='[email][/email]' style='width: 48px;' onClick='javascript: smile(\"[email][/email]\");'>"; echo "<Input Type='BUTTON' Name='[url][/url]' Value='[url][/url]' style='width: 60px;' onClick='javascript: smile(\"[url][/url]\");'>"; echo "<IMG Src='".$img['smiles']."/icon_arrow.gif' onClick='javascript: smile(\":arrow:\")'>"; echo "<IMG Src='".$img['smiles']."/icon_biggrin.gif' onClick='javascript: smile(\":D\");'>"; echo "<IMG Src='".$img['smiles']."/icon_confused.gif' onClick='javascript: smile(\":S\");'>"; echo "<IMG Src='".$img['smiles']."/icon_cool.gif' onClick='javascript: smile(\"8)\");'>"; echo "<IMG Src='".$img['smiles']."/icon_cry.gif' onClick='javascript: smile(\":*(\");'>"; echo "<IMG Src='".$img['smiles']."/icon_eek.gif' onClick='javascript: smile(\":shock:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_evil.gif' onClick='javascript: smile(\":evil:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_exclaim.gif' onClick='javascript: smile(\":!:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_frown.gif' onClick='javascript: smile(\"^:(\");'>"; echo "<IMG Src='".$img['smiles']."/icon_lol.gif' onClick='javascript: smile(\":lol:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_mad.gif' onClick='javascript: smile(\":x\");'>"; echo "<IMG Src='".$img['smiles']."/icon_mrgreen.gif' onClick='javascript: smile(\":mrgreen:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_neutral.gif' onClick='javascript: smile(\":|\");'>"; echo "<IMG Src='".$img['smiles']."/icon_question.gif' onClick='javascript: smile(\":?:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_razz.gif' onClick='javascript: smile(\":P\");'>"; echo "<IMG Src='".$img['smiles']."/icon_redface.gif' onClick='javascript: smile(\":oops:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_rolleyes.gif' onClick='javascript: smile(\":roll:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_sad.gif' onClick='javascript: smile(\":(\");'>"; echo "<IMG Src='".$img['smiles']."/icon_smile.gif' onClick='javascript: smile(\":)\");'>"; echo "<IMG Src='".$img['smiles']."/icon_surprised.gif' onClick='javascript: smile(\":o\");'>"; echo "<IMG Src='".$img['smiles']."/icon_twisted.gif' onClick='javascript: smile(\":twisted:\");'>"; echo "<IMG Src='".$img['smiles']."/icon_wink.gif' onClick='javascript: smile(\":wink:\");'>"; echo "<br><br>Bericht: "; echo "<Textarea Name='content' style='width: 350px; height: 150px;'>"; echo "<Input Type='SUBMIT' Name='submit' Value='Submit!' style='width: 100px; margin-left: 25px;'margin-right: 25px;'>"; echo "<input type='hidden' name='date' value='date('d-m-y H:i')'>"; echo "<input type='hidden' name='nid' value='".$nid."'>"; echo "<input type='submit' name='submit' value='Submit'>"; } else { if(!IsSet($_POST['poster']) || empty($_POST['poster'])) { echo "Error!- Geen naam ingevuld!"; } else if(!IsSet($_POST['content']) || empty($_POST['content'])) { echo "Error!- You have to type a message!"; } }
Het script zelf werkt, het toevoegen van comments dus, maar als ik op een smiley klik, of op de knop , dan worden deze niet toegevoegd in het textvlak...
Iemand van jullie die weet waarom?
|