Нужна помошь DIV Iframe

zaffasoft

Member
Joined
Jan 18, 2005
Messages
107
Reaction score
0
Age
37
Ребят. Хотел попросить помощи. Мне нужно сделать Кнопку прозрачную в виде картинки png. Дальше чтобы во время нажатия кнопки отрывалась окно не типа как popup. Пример вот с этого сайта hxxp://amedia.ru/zimaletto/ Там две кнопки где инфо о проекте вот такие фишки мне нужно осуществить. Каким образом?
 

ckam

Member
Joined
Apr 16, 2005
Messages
33
Reaction score
18
Age
40
Location
Ukraine
посмотри код и возьми то, что тебе нужно
 

zaffasoft

Member
Joined
Jan 18, 2005
Messages
107
Reaction score
0
Age
37
Помогите исправить Java ошибку

Помогите исправить Java ошибку в статус баре отображает.

<!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" />
<link rel="stylesheet" href="css/default.css" tppabs="css/default.css">
<link rel="stylesheet" href="css/windows.css" tppabs="css/windows.css">
<title>Untitled Document</title>
<style type="text/css">
<!--
a:link {
text-decoration: none;
color: #00CCFF;
}
a:visited {
text-decoration: none;
color: #00CCFF;
}
a:hover {
text-decoration: none;
color: #00CCFF;
}
a:active {
text-decoration: none;
color: #00CCFF;
}
-->
</style></head>
<body>


<script language="javascript">
var prevLoadHandler = (this.onload) ? this.onload : new Function;
this.onload = onLoad;

function onLoad() {
obj = document.getElementById("zafar");
if (typeof(obj)!="undefined"){
showWin(obj)
}
}

function DoWindow(Id)
{
var elems = document.body.getElementsByTagName("DIV");

for(index = 0; index < elems.length; index++)
{
obj = elems[index];
var oAttrColl = obj.attributes;
var strValue = '';
for (i = 0; i < oAttrColl.length; i++)
{
oAttr = oAttrColl;
if(typeof(oAttr.nodeName)!='undefined'){
if('name' == oAttr.nodeName.toLowerCase()){
strValue = oAttr.nodeValue;
break;
}
}
}

if(strValue.length>0){
if(strValue==Id)
break;
else
obj=null;
}
else
obj=null;
}

if(!obj){
alert('Ваш браузер не поддерживает нужную функциональность.\n Попробуйте обновить его или воспользоваться другим браузером.')
return false;
}
///alert(Id)

if((obj.style.display == 'none') ||
(obj.style.visibility == 'hidden'))
showWin(obj)
else
closeWin(obj)
}

function closeWin(obj) {
obj.style.display = 'none';
obj.style.visibility = 'hidden';
}

function changePic(sender) {
if (sender == 'profile') {
document.getElementById('pic-profile').src = 'images/btn-profile_a.gif'
document.getElementById('pic-profile-photo').src = 'images/btn-photoarc.gif'
}
if (sender == 'profile-photo') {
document.getElementById('pic-profile').src = 'images/btn-profile.gif'
document.getElementById('pic-profile-photo').src = 'images/btn-photoarc_a.gif'
}
}

function showWin(obj) {
obj.style.display = 'block';
obj.style.visibility = 'visible';
}
</script>
<DIV id=profile-window-container style="DISPLAY: none; VISIBILITY: hidden" name="room39">
<DIV id=inner>
<DIV id=sub-inner><A onclick="changePic('profile')" href="zafar_info.htm" tppabs="zafar_info.htm" target=profile><IMG id=pic-profile height=172 alt="" src="images/btn-profile_a.gif" tppabs="images/btn-profile_a.gif" width=36></A> <A onclick="changePic('profile-photo')" href="zafar_photos.htm" tppabs="zafar_photos.htm" target=profile><IMG id=pic-profile-photo height=165 alt="" src="images/btn-photoarc.gif" tppabs="images/btn-photoarc.gif" width=36></A> </DIV>
<DIV id=iframe-container><IFRAME name=profile src="zafar_info.htm" tppabs="zafar_info" frameBorder=0 width="100%" scrolling=no height=518></IFRAME></DIV></DIV></DIV>
</DIV>
<DIV id=standart-window-container style="DISPLAY: none; VISIBILITY: hidden" name="room19">
<DIV id=inner><IFRAME name=journal src="zafar_corpinfo.htm" tppabs="zafar_corpinfo.htm" frameBorder=0 width="100%" scrolling=no height=490></IFRAME></DIV><!-- // Journal window --></DIV>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="121" background="images/head-bg-diagonal.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%">&nbsp;</td>
<td width="22%">&nbsp;</td>
<td width="77%"><table width="83%" border="0" align="center" cellpadding="0" cellspacing="0" id="menu">
<tr>
<td width="276" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Кабинет Директора</b></font> </td>
<td width="259" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Кабинет IT-Department</b></font></a> </td>
<td width="172" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Прихожая</b></font></a> </td>
</tr>
<tr>
<td width="276" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Кабинет Координатора</b></font> </td>
<td width="259" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Харчевня</b></font></a> </td>
<td width="172" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Meeting Room</b></font></a> </td>
</tr>
<tr>
<td width="276" height="24" align="left"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3"><b>Кабинет Администрации</b></font></a> </td>
</tr>
</table></td>
</tr>
</table></td>
<!-- /First Table/ -->
</tr>
<tr>
<td background="images/inner-bg_reception.jpg">


<div id="body2" style="height: 556px;">


<div id="objects-buttons"style="height: 80px;padding-left: 60px;">


<a href="JavaScript:DoWindow('room39')"><img src="images/dp496.png" tppabs="images/dp496.png" width="194" height="73" style="behavior: url(images/png.htc);float: left;display: inline; alt="Hello"></a>
<a href="JavaScript:DoWindow('room19')"><img src="images/dp510.png" tppabs="images/dp510.png" width="194" height="73" style="behavior: url(images/png.htc);float: left;display: inline; alt="hello"></a></a></a>
</div>
</div>


</td>
</tr>
<tr>
<td>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="17%" align="right" background="images/head-bg-diagonal.gif"><img src="images/bar.jpg" width="120" height="60" /></td>
<td width="31%" align="center" background="images/head-bg-diagonal.gif"><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">All Right Reserved 2001-2007 Vasya Pupkin <br />
Developed by Pupkin </font></td>
<td width="52%" align="right" valign="bottom" background="images/head-bg-diagonal.gif"></td>
</tr>
</table>


</td><!--3 Tableron -->
</tr>
</table>
</body>
</html>
 

sudila

Member
Joined
May 6, 2004
Messages
15
Reaction score
1
Age
45
Location
Хайфа, Крайот
PHP:
function onLoad() {
obj = document.getElementById("zafar");

Во первых, в твоем коде нет тэга с id="zafar"
Во вторых, document.body.getElementById()

получается что твой код ищет элемент с id="zafar" коего нет, и по этому твой obj = NULL

и следующая строка невыполнима.
if (typeof(obj)!="undefined")

соответственно дальше по коду ты передаешь obj в надежде что он обьект, а он к сожалению NULL
 

zaffasoft

Member
Joined
Jan 18, 2005
Messages
107
Reaction score
0
Age
37
Спасиб. Разобрался. Тема закрыта.
 
Top