Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    May 2006
    Location
    Bristol, UK
    Posts
    147
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Can i add a comment next to the image in....

    hi guys,

    i have some javascript on my site:- Farting Fish

    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

  • #2
    New Coder
    Join Date
    Feb 2006
    Location
    Italy
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    If you want to put it on the right of smth, use a SPAN, not a DIV
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #4
    New Coder
    Join Date
    Feb 2006
    Location
    Italy
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Kor
    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

  • #5
    Regular Coder
    Join Date
    May 2006
    Location
    Bristol, UK
    Posts
    147
    Thanks
    6
    Thanked 2 Times in 2 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •