Jump to content

[SOLVED] lightbox instead of window.open


newbtophp

Recommended Posts

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