Jump to content

Java help


Dane

Recommended Posts

the best way to do this, is to add your smilies in the same page as your textarea; this will eliminate the need to open a pop-up each time a smiley is wanted.

 

<script language="javascript">
function getHappy()
{
document.getElementById('smile').style.display='block';
}
function getSad()
{
document.getElementById('smile').style.display='none';
}
</script>

<img src="smiley-image.jpg" onclick="getHappy()" style="cursor:pointer">
<br style="line-height:0.01em">
<div id="smile" style="display:none;width:200px;height:200px;overflow:auto;background:white;border:solid 1px black;position:absolute;z-index:1000;margin-top:-5px">
<div style="height:15px;overflow:hidden;text-align:right;background:black;color:white;width:auto;font-family:arial;font-size:10px;padding-right:5px"><span style="cursor:pointer" title="close" onclick="getSad()">X</span></div>
<!-- add your smilies here -->
</div>
<textarea style="width:500px;height:200px"></textarea>

 

but if you want to use a pop-up window for your smilies; you need to use a JavaScript Pop-Up Remote Control.

 

here is a good example:

 

http://javascript.internet.com/navigation/remote-control.html

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.