Thumb Viewer 
Author Message
 Thumb Viewer

Hi,
I figred one thing out thats how to change the position of the big image.
The other ting I want is that if you click on the big image it closses, but
I don't find it, please someone help me, I have to get this done in the next
couple of days.
Here is the source again:

/*
Thumbnail image viewer-
? Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit
http://www.*-*-*.com/
*/

function enlarge(which,e){
//Render image code for IE 4+
if (document.all){
if (showimage.style.visibility=="hidden"){
showimage.style.left=10
showimage.style.top=10
showimage.innerHTML='<img src="'+which+'">'
showimage.style.visibility="visible"

Quote:
}

else
showimage.style.visibility="hidden"
return false
Quote:
}

//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#"
onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
document.showimage.document.close()
document.showimage.left=10
document.showimage.top=10
document.showimage.visibility="show"
Quote:
}

else
document.showimage.visibility="hide"
return false
Quote:
}

//if NOT IE 4+ or NS 4, simply display image in full browser window
else
return true

Quote:
}

//By Dynamicdrive.com

//drag drop function for NS 4////
/////////////////////////////////

var nsx
var nsy
var nstemp

function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns

Quote:
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
Quote:
}

function dragns(e){
temp.moveBy(e.x-nsx,e.y-nsy)
return false

Quote:
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)

Quote:
}

//drag drop function for IE 4+////
/////////////////////////////////

var dragapproved=false

function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false

Quote:
}
}

function initializedragie(){
if (event.srcElement.parentElement.id=="showimage"){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie

Quote:
}
}

if (document.all){
document.onmousedown=initializedragie
document.onmouseup=new Function("dragapproved=false")
Quote:
}



Wed, 23 Jul 2003 17:26:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. thumbs-up, thumbs-down icons

2. Thumb ActiveX

3. Thumb ActiveX

4. picture upload und automatische thumb generierung

5. Thumb ActiveX

6. Postscript pre-viewer using VT100 terminal?

7. TIFF viewer for IBM compat.

8. PostScript viewer for IBM

9. PostScript viewer for IBM PC-XT + CGA

10. AN: Flate compression viewer utility

11. looking for PostScript viewer on mac

12. PS viewer for Windows

 

 
Powered by phpBB® Forum Software