- Код: Выделить всё
<div style="float:left; margin:0px 18px 18px 0px;">
<a href="/image.html?id=31250" rel="lightbox[screen]"><img src="/image.html?id=31250&size=small" alt="Бологое" width="80" height="60" /></a>
</div>
Модератор: [mweb team]
<div style="float:left; margin:0px 18px 18px 0px;">
<a href="/image.html?id=31250" rel="lightbox[screen]"><img src="/image.html?id=31250&size=small" alt="Бологое" width="80" height="60" /></a>
</div>
<a href="#null" class="menu2" onclick="showPic('kontakt/cyti/tumen.jpg', 500, 333)">г. Тюмень, пос. Матмасы</a>
<!--
function showPic(pic, x , y){
// проверяем не показывается ли в данный момент
// какая-нибудь большая кортинка и если да - уничтожаем ее
if(document.getElementById("picture")){document.body.removeChild(document.getElementById("picture"));}
// создаем див и вставляем в него нашу кортинко
var ppic = top.document.createElement("div");
ppic.setAttribute("id","picture");
ppic.style.position = "absolute";
ppic.style.zIndex = "2";
ppic.style.width = x + "px";
ppic.style.height = y + "px";
ppic.style.left = parseInt(document.body.clientWidth/2 - x/2) + "px";
ppic.style.top = parseInt(document.body.clientHeight/2 - y/2) + document.body.scrollTop + "px";
ppic.style.color = "#000";
ppic.style.backgroundImage = "url(loading.gif)";
ppic.style.backgroundPosition = "center";
ppic.style.backgroundRepeat = "no-repeat";
ppic.style.padding = "10px 10px 10px 10px";
top.document.body.appendChild(ppic);
ppic.onclick = function(){top.document.body.removeChild(this)};
ppic.innerHTML = "<img src='" + pic + "' title='скрыть' alt='' style='cursor:pointer' width=" + x + " height=" + y + " onload='this.parentNode.style.backgroundColor = \"#e0dfe3\"; this.parentNode.style.border = \"2px outset #fff\"'>";
}
//-->
<!--
function brwcheck() {
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
this.oldOpera = this.agent.indexOf("Opera/9.2")>-1
this.Firefox = this.agent.indexOf("Firefox")>-1
this.Safari = this.agent.indexOf("Safari")>-1
return this
}
var bw=new brwcheck()
if (bw.ie6) {var delta = 24} else {var delta = 20}
function showPic(pic, x , y){
// проверяем не показывается ли в данный момент
// какая-нибудь большая кортинка и если да - уничтожаем ее
if(document.getElementById("picture")){document.body.removeChild(document.getElementById("picture"));}
// создаем див и вставляем в него нашу кортинко
var ppic = top.document.createElement("div");
ppic.setAttribute("id","picture");
ppic.style.position = "absolute";
ppic.style.zIndex = "2";
ppic.style.border = "none";
ppic.style.width = x + delta + "px";
ppic.style.height = y + delta + "px";
ppic.style.left = parseInt(document.body.clientWidth/2 - x/2 - 2) + "px";
ppic.style.top = parseInt(document.body.clientHeight/2 - y/2 - 2) + document.body.scrollTop + "px";
ppic.style.color = "#000";
ppic.style.backgroundImage = "url(http://www.colormusic.ru/img/loading.gif)";
ppic.style.backgroundPosition = "center";
ppic.style.backgroundRepeat = "no-repeat";
ppic.style.overflow = "hidden";
ppic.style.border = "2px outset #fff";
top.document.body.appendChild(ppic);
ppic.onclick = function(){top.document.body.removeChild(this)};
ppic.innerHTML = "<img src='" + pic + "' alt='' style='cursor:pointer; border: #e0dfe3 10px solid' width=" + x + " height=" + y + " onload='this.title = \"скрыть\"'>";
}
//-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Untitled Document</title>
<script type="text/javascript">
function move(anch) {
var t = document.getElementById('main').getElementsByTagName('input');
for (var i=0; i<t.length; i++) if (t[i].name==anch) t[i].focus();
}
</script>
</head>
<body>
<div style="overflow:auto; height:200px;" id="main">
<input name="bad" type="text" style="width:0; height:0; border:0;">
<img src="character.png" alt="" width="221" height="225" />
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Текст с на который ссылаемся</p>
<input name="well" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
<input name="bad" type="text" style="width:0; height:0; border:0;">
<p>Некий текст</p>
</div>
<input type="button" onclick="move('well')" value="прокрутить" />
</body>
</html>
<script type="text/javascript">
function move(anch) {
var t = document.getElementById('main').getElementsByTagName('input');
for (var i=0; i<t.length; i++) if (t[i].name==anch) {
t[i].style.position = "relative";
t[i].style.top = "100px";
t[i].focus();
}
}
</script>
t[i].style.top = "100px";
<!--
function brwcheck() {
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
this.oldOpera = this.agent.indexOf("Opera/9.2")>-1
this.Firefox = this.agent.indexOf("Firefox")>-1
this.Safari = this.agent.indexOf("Safari")>-1
return this
}
var bw=new brwcheck()
if (bw.ie6) {var delta = 24} else {var delta = 20}
function showPic(pic, x , y){
// проверяем не показывается ли в данный момент
// какая-нибудь большая кортинка и если да - уничтожаем ее
if(document.getElementById("picture")){document.body.removeChild(document.getElementById("picture"));}
// создаем див и вставляем в него нашу кортинко
var ppic = top.document.createElement("div");
ppic.setAttribute("id","picture");
ppic.style.position = "absolute";
ppic.style.zIndex = "2";
ppic.style.border = "none";
ppic.style.width = x + delta + "px";
ppic.style.height = y + delta + "px";
ppic.style.left = parseInt(document.body.clientWidth/2 - x/2 - 2) + "px";
ppic.style.top = parseInt(document.body.clientHeight/2 - y/2 - 2) + document.body.scrollTop + "px";
ppic.style.color = "#000";
ppic.style.backgroundImage = "url(http://www.colormusic.ru/img/loading.gif)";
ppic.style.backgroundPosition = "center";
ppic.style.backgroundRepeat = "no-repeat";
ppic.style.overflow = "hidden";
ppic.style.border = "transparent 2px outset";
top.document.body.appendChild(ppic);
ppic.onclick = function(){top.document.body.removeChild(this)};
ppic.innerHTML = "<img src='" + pic + "' alt='' style='cursor:pointer; border: #e0dfe3 10px solid' width=" + x + " height=" + y + " onload='this.title = \"скрыть\"; this.paretNode.borderColor=\"#FFFFFF\"'>";
}
//-->
<script type="text/javascript" src="http://www.taggify.net/view.ashx?key=e24b7bfc74c34772b515f00df10a9636&fade=cccccc&transparency=50&border=333333&background=eeeeee&width=2" language="javascript" charset="utf-8" ></script>
src="http://www.taggify.net/view.ashx?key=e24b7bfc74c34772b515f00df10a9636&fade=cccccc&transparency=50&border=333333&background=eeeeee&width=2" language="javascript" charset="utf-8" >
&
.nono {cursor:not-allowed}
<img class="nono" src="support/garant.gif" alt="Гарантийная защита цветомузыки" width="250" height="200" border="0">
110 .nono Value Error : cursor not-allowed is not a cursor value : not-allowed
onclick="return hs.expand(this)"
<td><script language="JavaScript" src="foto/1/foto1.js"></script>
<script language="JavaScript" src="use/js/slideshow.js"></script></td>
<td><script language="JavaScript" src="foto/2/foto2.js"></script>
<script language="JavaScript" src="use/js/slideshow.js"></script></td>
Владимир писал(а):1. Будет ли сия штука работать на странице в нескольких копиях?
Владимир писал(а):2. Если нажать на картинку, чтоб она увеличилась, на этом процесс останавливается, ее даже закрыть нельзя, разве так должно быть?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="http://www.electricprism.com/aeron/slideshow/css/slideshow.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.electricprism.com/aeron/slideshow/css/lightbox.css" media="screen" />
<style type="text/css">
a { color: #404040; }
a:hover { text-decoration: none; }
code { color: #404040; font: normal 10px Monaco, monospace; }
em { color: #808080; font-style: normal; }
h1 { color: #000; font: normal 12px/16px Arial, sans-serif; padding: 0 20px 16px; text-transform: lowercase; }
h1:before { content: '.'; }
p { color: #404040; font: normal 12px/16px Arial, sans-serif; padding: 0 20px 16px; }
</style>
<script type="text/javascript" src="http://www.electricprism.com/aeron/slideshow/js/mootools.js"></script>
<script type="text/javascript" src="http://www.electricprism.com/aeron/slideshow/js/slideshow.js"></script>
<script type="text/javascript" src="http://www.electricprism.com/aeron/slideshow/js/lightbox.js"></script>
<script type="text/javascript">
//<![CDATA[
window.addEvent('domready', function(){
var data = {
'1.jpg': { caption: 'Описание первой картинки.' },
'2.jpg': { caption: 'Описание второй картинки.' },
'3.jpg': { caption: 'Описание третьей картинки.' },
'4.jpg': { caption: 'Описание четвертой картинки.' }
};
// captions - подписи, controller - контроллер всплывающий (туды-сюды), delay - задержка смены кадров, height - высота, hu - путь к картинке, linked - есть ли большие картинки, width - ширина.
var myShow = new Slideshow('show', data, { captions: true, controller: true, delay: 3000, height: 300, hu: 'examples/', linked: true, width: 400 });
// Паузы при открытии большой картинки установить или не стоит.
var box = new Lightbox({
'onClose': function(){ this.pause(false); }.bind(myShow),
'onOpen': function(){ this.pause(true); }.bind(myShow)
});
});
//]]>
</script>
</head>
<body>
<div id="show" class="slideshow">
<a rel="lightbox" href="http://www.muerto.ru">
<img src="examples/1.jpg" width="400" height="300" alt="картинки в слайдшоу" />
</a>
</div>
</body>
</html>
Короче на этом скрипте было предложено поставить крест. Однако я решил не сдаваться, и долго чесал свою репу. А в ней уже потихоньку начинают зарождаться разные мысли - хоть я и малоопытный юзер, но весьма неглуп. Просто надо было подойти к решению задачи с другой стороны. Ну раз нельзя размещать две копии скрипта на одной странице - ну и не надо, разместим их на разных страницах, а странички вставим в <iframe>. Вот и все! http://www.colormusic.ru/foto.htmlНе, не выйдет с этим скриптом по ходу. Объекты скриптом создаются с одинаковыми айди, под этот айди скрипт и заточен. А два объекта с одинаковыми айди - работать не будут. Точнее, будет работать только один из них. Переписывать этот скрипт под несколько объектов - морока. Ищи другой скрипт, который такое поддерживает.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 39