ANTICHAT — форум по информационной безопасности, OSINT и технологиям
ANTICHAT — русскоязычное сообщество по безопасности, OSINT и программированию.
Форум ранее работал на доменах antichat.ru, antichat.com и antichat.club,
и теперь снова доступен на новом адресе —
forum.antichat.xyz.
Форум восстановлен и продолжает развитие: доступны архивные темы, добавляются новые обсуждения и материалы.
⚠️ Старые аккаунты восстановить невозможно — необходимо зарегистрироваться заново.
 |
|

15.03.2007, 17:31
|
|
Новичок
Регистрация: 27.02.2007
Сообщений: 8
Провел на форуме: 33084
Репутация:
0
|
|
Всем спасибо!
Люди помогли...и вот, что у меня получилось!
Код:
<script type="text/javascript">
var Timer;
function ScrollLeft()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollLeft -= 2", 10);
}
function ScrollRight()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollLeft += 2", 10);
}
function ScrollUp()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollTop += 2", 10);
}
function ScrollDown()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollTop -= 2", 10);
}
function Resize()
{
Timer = setInterval("document.getElementById('picture').style.width=parseInt(document.getElementById('picture').style.width)-10+'px'", 30);
}
function Resizee()
{
Timer = setInterval("document.getElementById('picture').style.width=parseInt(document.getElementById('picture').style.width)+10+'px'", 30);
}
</script>
<div id="PANORAMA" style="width:700px; height:550px; border: 1px solid;
overflow:hidden">
<img id="picture" src="2.gif" style="width:700px"/>
</div>
<div style="width:700px; text-align:center">
<input type="button" value="<" title="Scroll left" style="width:25px"
onmousedown="ScrollLeft()"
onmouseup="clearInterval(Timer)">
<input type="button" value=">" title="Scroll right" style="width:25px"
onmousedown="ScrollRight()"
onmouseup="clearInterval(Timer)">
<input type="button" value="\/" title="Scroll down" style="width:25px"
onmousedown="ScrollUp()"
onmouseup="clearInterval(Timer)">
<input type="button" value="/\" title="Scroll up" style="width:25px"
onmousedown="ScrollDown()"
onmouseup="clearInterval(Timer)">
<input type="button" value="-" title="-" style="width:25px"
onmousedown="Resize()"
onmouseup="clearInterval(Timer)">
<input type="button" value="+" title="+" style="width:25px"
onmousedown="Resizee()"
onmouseup="clearInterval(Timer)">
</div>
|
|
|

15.03.2007, 19:43
|
|
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме: 16641028
Репутация:
2371
|
|
Тултип - вывод подсказки....
все остальное уже описано прошлым постом
|
|
|

15.03.2007, 19:45
|
|
Постоянный
Регистрация: 23.03.2006
Сообщений: 977
Провел на форуме: 2976185
Репутация:
694
|
|
просто нужно выводить скрытый див с картинкой во весь размер. что сложного?
|
|
|

16.03.2007, 16:44
|
|
Новичок
Регистрация: 27.02.2007
Сообщений: 8
Провел на форуме: 33084
Репутация:
0
|
|
Появился еще один небольшой вопрос: можно ли на изображения поместить некоторое количество объектов(независящих друг от друга, например квадрат и треугольник, тыкаю на квадрат открывается одно меню, на треугольник - другое)?
Где про это можно почитать?
|
|
|

25.04.2007, 16:27
|
|
Новичок
Регистрация: 27.02.2007
Сообщений: 8
Провел на форуме: 33084
Репутация:
0
|
|
<html>
<script type="text/javascript">
var Timer;
function ScrollLeft()
{
Timer = setInterval("document.getElementById('PANORAMA').s crollLeft -= 2", 10);
}
function ScrollRight()
{
Timer = setInterval("document.getElementById('PANORAMA').s crollLeft += 2", 10);
}
function ScrollUp()
{
Timer = setInterval("document.getElementById('PANORAMA').s crollTop += 2", 10);
}
function ScrollDown()
{
Timer = setInterval("document.getElementById('PANORAMA').s crollTop -= 2", 10);
}
function Resize()
{
Timer = setInterval("document.getElementById('picture').st yle.width=parseInt(document.getElementById('pictur e').style.width)-10+'px'", 30);
T = setInterval("document.getElementById('p1').style.w idth=parseInt(document.getElementById('p1').style. width)-10+'px'", 30);
}
function Resizee()
{
Timer = setInterval("document.getElementById('picture').st yle.width=parseInt(document.getElementById('pictur e').style.width)+10+'px'", 30);
T = setInterval("document.getElementById('p1').style.w idth=parseInt(document.getElementById('p1').style. width)+10+'px'", 30);
}
</script>
<div id="PANORAMA" style="width:700px; height:550px; border: 1px solid;overflow:hidden">
<img id='p1' src='1.gif' style="position:absolute;left:123px;top:343px">
<img id="picture" src="2.gif" style="width:700px"/>
</div>
<div style="width:700px; text-align:center">
<input type="button" value="<" title="Scroll left" style="width:25px"
onmousedown="ScrollLeft()"
onmouseup="clearInterval(Timer)">
<input type="button" value=">" title="Scroll right" style="width:25px"
onmousedown="ScrollRight()"
onmouseup="clearInterval(Timer)">
<input type="button" value="\/" title="Scroll down" style="width:25px"
onmousedown="ScrollUp()"
onmouseup="clearInterval(Timer)">
<input type="button" value="/\" title="Scroll up" style="width:25px"
onmousedown="ScrollDown()"
onmouseup="clearInterval(Timer)">
<input type="button" value="-" title="-" style="width:25px"
onmousedown="Resize()"
onmouseup="clearInterval(Timer,T)">
<input type="button" value="+" title="+" style="width:25px"
onmousedown="Resizee()"
onmouseup="clearInterval(Timer,T)">
</div>
</html>
Кто-нибудь, объясните мне пожалуйсто, почему у меня объявленные функции действуют только на id="picture", а на id='p1' не деуствуют!? Где ошибка?
|
|
|

26.04.2007, 02:37
|
|
Участник форума
Регистрация: 31.10.2006
Сообщений: 212
Провел на форуме: 1073612
Репутация:
50
|
|
Сообщение от SiNaC0m
тыкаю на квадрат открывается одно меню, на треугольник - другое)?
Где про это можно почитать?
см MAP & AREA
Последний раз редактировалось bopoh13; 26.04.2007 в 02:53..
|
|
|

26.04.2007, 10:36
|
|
Новичок
Регистрация: 27.02.2007
Сообщений: 8
Провел на форуме: 33084
Репутация:
0
|
|
Спасибо за советы! Только вот как мне теперь сделать что бы функции увеличения\уменьшения изображения заработали?
Код:
<script type="text/javascript">
var Timer;
function ScrollLeft()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollLeft -= 2", 10);
}
function ScrollRight()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollLeft += 2", 10);
}
function ScrollUp()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollTop += 2", 10);
}
function ScrollDown()
{
Timer = setInterval("document.getElementById('PANORAMA').scrollTop -= 2", 10);
}
function Resize()
{
Timer = setInterval("document.getElementById('karta').style.width=parseInt(document.getElementById('karta').style.width)-10+'px'", 30);
}
function Resizee()
{
Timer = setInterval("document.getElementById('karta').style.width=parseInt(document.getElementById('karta').style.width)+10+'px'", 30);
}
</script>
<div id="PANORAMA" style="width:450px; height:340px; border: 1px solid;
overflow:hidden">
<img src="1.gif" usemap="#karta1" id="karta">
<map name="karta1">
<area href="123.html" shape="rect" coords="25,36,114,98">
</map>
</div>
<div style="width:700px; text-align:center">
<input type="button" value="<" title="Scroll left" style="width:25px"
onmousedown="ScrollLeft()"
onmouseup="clearInterval(Timer)">
<input type="button" value=">" title="Scroll right" style="width:25px"
onmousedown="ScrollRight()"
onmouseup="clearInterval(Timer)">
<input type="button" value="\/" title="Scroll down" style="width:25px"
onmousedown="ScrollUp()"
onmouseup="clearInterval(Timer)">
<input type="button" value="/\" title="Scroll up" style="width:25px"
onmousedown="ScrollDown()"
onmouseup="clearInterval(Timer)">
<input type="button" value="-" title="-" style="width:25px"
onmousedown="Resize()"
onmouseup="clearInterval(Timer)">
<input type="button" value="+" title="+" style="width:25px"
onmousedown="Resizee()"
onmouseup="clearInterval(Timer)">
</div>
|
|
|

27.04.2007, 21:33
|
|
Участник форума
Регистрация: 03.05.2006
Сообщений: 167
Провел на форуме: 125505
Репутация:
116
|
|
ИМХО лучше показывать маленьку картинку, 100x100 или приблизительно такого размера, при наведении на нее или нажатии подружать саму картинку через AJAX и показывать в всплывающем окошке.
|
|
|

27.04.2007, 21:52
|
|
Новичок
Регистрация: 27.02.2007
Сообщений: 8
Провел на форуме: 33084
Репутация:
0
|
|
В том то и дело, что мне надо именно так, как описанно в коде... Это что то типа ГуглМэп!
|
|
|
|
 |
|
Похожие темы
|
| Тема |
Автор |
Раздел |
Ответов |
Последнее сообщение |
|
Books JS
|
FRAGNATIC |
PHP |
0 |
11.08.2005 16:57 |
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|