position image based on document position

E

edouard.lauer

Hello,

i've a table generated by PHP which contains about 300 entries. On each
row you've a link that is a reference to a picture. I want to show the
image on the same document based on the position of the row clicked.
I've a div layer but I do not know how I can do that in javascript to
reposition the image.
Please note that I've IE as browser (if that matters).

Regards,
Edi
 
I

impaler

retrieve the image and put it in a cell on the same row as the link or
creata a new row for the image or whatever you would like to display
it, and make that cell (div etc) invisible and the link should
hide/show the image.

divContainingImg.style.display = (divContainingImg.style.display ==
'none') ? '' : 'none';

should do it.
where divContainingImg is the div or cell or whatever contains the
image. Pass an id to the function and use getElementById or pass simply
the object etc and the function will do the rest
eg:

function showHideImg(id) {
divContainingImg = document.getElementById(id);
divContainingImg.style.display = (divContainingImg.style.display ==
'none') ? '' : 'none';
}
 
E

edouard.lauer

Hello,

thanks for the answer but this is not what I want to do. I want really
the image to appear separatly of the table but at the same locate as
the actual row. How do I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top