i wrote a javascript... for the preview of pic and movie
<SCRIPT Language=Javascript>
var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all
function enlarge(which,e,ty,filename){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX
crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
if (ty=="~img37"){
crossobj.innerHTML='<div align=right id=drag><table bgcolor=white><tr><td><b><a href="" onClick="return closepreview(event)" style=font-family:tahoma;font-size:8pt><font color=red>Review - '+filename+'<b onClick=closepreview(event) style=font-family:tahoma;font-size:8pt><font color=red>[X]</font></b></td></tr></table></div><img src="'+which+'" height=480 width=640>'
crossobj.style.visibility="visible"
}else if (ty=="~img45"||ty=="~img35"){
crossobj.innerHTML='<div align=right id=drag><table bgcolor=white><tr><td><b><a href="" onClick="return closepreview(event)" style=font-family:tahoma;font-size:8pt><font color=red>Review - '+filename+'[X]</font></b></td></tr></table></div><object data="'+which+'" height=260 width=320 type="video/quicktime"></object>'
crossobj.style.visibility="visible"
}else{
crossobj.innerHTML='<div align=center id=drag><table bgcolor=white><tr><td align=center><b><a href="" onClick="return closepreview(event)" style=font-family:tahoma;font-size:12pt><font color=red>這不是圖片或影片!不可預覽![X]</font></b></td></tr></table></div>'
crossobj.style.visibility="visible"
}
return false
}
function closepreview(e){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX
crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
crossobj.innerHTML=''
crossobj.style.visibility="hidden"
return false
}
</script>
but i discover that the ~img_file code will change everytime when u start the HFS..how come?
and it cant auto load the HTML Template.
preview...??
it may cause a lot of source(for CPU)
that's a good idea but not suitable for slow computer...
PS:i see that ther are some chinese word...
i know the meaning coz i am a chinese...
but ... this is a english forum
change all language into english, ok??