newbtophp Posted October 19, 2009 Share Posted October 19, 2009 Im using the following javascript function on the page where i click to open a pop up which contains smileys: index.php: <script> function showSmileys(){ var w = window.open('smileys.htm','Smiley Chooser','width=610,height=550,scrollbars=1'); w.targetField = targetField; w.focus(); return false; } function insertSmiley(a){ document.getElementById('msg_txt').value += a; } </script> I click the following code which opens the smileys popup: <a href="javascript:showSmileys();void(0)">Smileys</a> And then on the poped up page (smileys page), I have the following javascript: smileys.htm: <script> function putSmiley(a){ opener.insertSmiley(a); window.close(); } </script> and im using it like this: <a href="javascript:putSmiley(')');void(0)" style="text-decoration:none;color:white;"><img src="images/smileys/21.gif" title="laughing"></a> When i click on the smiley it places it within index.php, but what i want to do is instead of opening the smileys.htm page in a popup open it in a lightbox. I found the following code: ( http://particletree.com/examples/lightbox/ ) which is the effect that im after, anyone can help? :-\ Link to comment https://forums.phpfreaks.com/topic/178205-solved-lightbox-instead-of-windowopen/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.