Dane Posted December 2, 2007 Share Posted December 2, 2007 Hey guys, i dont know wether this is possible or not but can you have a javascript pop up with say smileys and click on a smiley and it adds the smiley into the textarea on the other page? Quote Link to comment Share on other sites More sharing options...
singhp Posted December 3, 2007 Share Posted December 3, 2007 not a javascript popup (like alert or confirm), but u can open a htm page (using window.open) where these smilies are listed and clicking there refreshes the parent page. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 4, 2007 Share Posted December 4, 2007 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.