Jump to content

Faces icon


garydt

Recommended Posts

Here's what I've tried but the symbols aren't going into the textarea.

        <form action="<?php echo $loginFormAction; ?>" method="POST" name="form1" id="form1">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<td>
  <a href="javascript:;" onClick="document.form1.post.value="""><img src="../smiley.gif" border="0" /></a></td>
		  <td ><br />
		  <strong>Enter post</strong><br />
		  <textarea name="post" cols="60" rows="7"><?php echo $edit; ?></textarea><p>
  		  <input name="Preview" type="submit" id="Preview" value="Preview" />  
  		  <input type="submit" name="Submit" value="Submit" /><p>

	  <input type="hidden" name="MM_insert" value="form1">
</td>

Link to comment
https://forums.phpfreaks.com/topic/79819-faces-icon/#findComment-405171
Share on other sites

i'm still having difficulties.

 

 

http://www.scriptygoddess.com/archives/2002/08/16/add-smileys-to-text/

 

That adds the smiley to your textarea, make sure you edit that script to fit your own needs.

 

Then download the smileys

 

Example

 

:) = images/smileys/happy.gif

 

..etc

Link to comment
https://forums.phpfreaks.com/topic/79819-faces-icon/#findComment-405445
Share on other sites

Thanks. I did what the site said and i put-

        <form action="<?php echo $loginFormAction; ?>" method="POST" name="form1" id="form1">
<script language=”javascript”>
<!–
function writeImgTag(code)
{
var cache = document.form1.post.value;
this.code = code;
document.form1.post.value = cache + ” <img src=’../smileys/” + code + “.gif’> “;
document.form1.post.focus();
}
//–>
</script>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<td>
<img src="../smileys/smiley.gif" onClick=”writeImgTag(’smiley’)” />
</td>
		  <td ><br />
		  <strong>Enter post</strong><br />
		  <textarea name="post" cols="60" rows="7"><?php echo $edit; ?></textarea><p>
  		  <input name="Preview" type="submit" id="Preview" value="Preview" />  
  		  <input type="submit" name="Submit" value="Submit" /><p>

 

I still get nothing in  the textarea when i click the face. What have i got wrong?

Link to comment
https://forums.phpfreaks.com/topic/79819-faces-icon/#findComment-405498
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.