Hi there. I'm trying to add smilies to a guestbook script. I have successfully used the same smiley script several times in other guestbooks but for some reason can't get it to work with this one. Below is the code I am using:
Code:
echo "\n".'<form method="post" action="'.SELF.'?func=sign" name="smile">
<script type="text/javascript">
<!--
function addsmiley(code)
{
var pretext = document.smile.message.value;
this.code = code;
document.smile.message.value = pretext + code;
}
//-->
</script>
<img src="image/smile/angel.gif" alt="image" onClick="addsmiley(':angel:')"/>
<textarea name="mesg" id="mesg" cols="20" rows="4">'.$mesg.'</textarea><br/><input type="submit" name="submit" value="Add" /></p></form>';
This produces the following error:
Parse error: parse error, unexpected ':', expecting ',' or ';'
Any help would be much appreciated! 
|