...

View Full Version : Can i add a comment next to the image in....



jonnybinthemix
05-04-2006, 06:09 AM
hi guys,

i have some javascript on my site:- Farting Fish (http://www.fartingfish.com/random.php)

When i click on a thumbnail it loads a larger version of the image in a popup window. I notice that there is a space to the right of the images in the pop up window.

My aim is to get an Image Description in that space

Is this possible?

Thanks in advance

Jon

Davide Zanotti
05-04-2006, 08:57 AM
Yes, you can, but first you should create a reference to the popup window, for example: var newWin = window.open(...);
Then you can create new element (divs,textnode...) and append them to newWin:

var messageContainer = document.createElement('div');
var msg = document.createTextNode('your comment');

messageContainer appendChild(msg);
newWin.appendChild(messageContainer);

I haven't tried the code but I think it should work

Kor
05-04-2006, 09:53 AM
If you want to put it on the right of smth, use a SPAN, not a DIV

Davide Zanotti
05-04-2006, 10:55 AM
If you want to put it on the right of smth, use a SPAN, not a DIV

span or div, with a bit of css he can put the comment everywhere he wants :)

jonnybinthemix
05-04-2006, 11:19 AM
thanks for the replies guys

Would it be possible for you to explain your answer a little bit clearer, i.e. what your code does and where i put it?

Bearing in mind i dont know javascript, as im sure you can see from thr source code of the gallery, the javascript was a downloaded script, so i dont know really how it works..

Thanks

Jon



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum