![]() |
|
Модераторы: Illuminaty |
![]()
|
|
| Гость_Sergo |
|
|||
|
Unregistered |
Доброе время суток.
Есть такой вот скриптик, хочу сделать что бы окно открывалось в заданоом месте. А вот чёй та не выходит (каменный цветок). Подскажите. Уж понравился скриптик. var ie=document.all var ns=document.layers var ns6=document.getElementById&&!document.all function enlarge(which,e){ //Render image code for IE 4+ and NS6 if (ie||ns6){ crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage if (crossobj.style.visibility=="hidden"){ 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='<div align=right id=drag>Можно тащить курсором <b onClick=closepreview() title="Закрыть" style="cursor:move; background:lightgreen;">X</b></div><img src="'+which+'">' crossobj.style.visibility="visible" } else crossobj.style.visibility="hidden" return false } //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=e.x document.showimage.top=e.y document.showimage.visibility="show" } else document.showimage.visibility="hide" return false } //if NOT IE 4+ or NS 4, simply display image in full browser window else return true } function closepreview(){ crossobj.style.visibility="hidden" } var nsx,nsy,nstemp function drag_dropns(name){ temp=eval(name) temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP) temp.onmousedown=gons temp.onmousemove=dragns temp.onmouseup=stopns } function gons(e){ temp.captureEvents(Event.MOUSEMOVE) nsx=e.x nsy=e.y } function dragns(e){ temp.moveBy(e.x-nsx,e.y-nsy) return false } function stopns(){ temp.releaseEvents(Event.MOUSEMOVE) } ///////////////////////////////// function drag_drop(e){ if (ie&&dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx crossobj.style.top=tempy+event.clientY-offsety } else if (ns6&&dragapproved){ crossobj.style.left=tempx+e.clientX-offsetx crossobj.style.top=tempy+e.clientY-offsety } return false } function initializedrag(e){ if (ie&&event.srcElement.id=="drag"||ns6&&e.target.id=="drag"){ offsetx=ie? event.clientX : e.clientX offsety=ie? event.clientY : e.clientY tempx=parseInt(crossobj.style.left) tempy=parseInt(crossobj.style.top) dragapproved=true document.onmousemove=drag_drop } } document.onmousedown=initializedrag document.onmouseup=new Function("dragapproved=false") document.write('<div id="showimage" style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; VISIBILITY: hidden; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; POSITION: absolute"></font></small><p> </p></div><p align="left"><a onclick="return enlarge(\'1.jpg\',event)" href="1.jpg"><img height="50" alt="Click to view image" src="1.jpg" width="50" border="0"></a>'); |
|||
|
||||
![]()
|
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | Вёрстка веб-сайтов | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |