레이어 브라우저 호환 문제

· 2013-06-13 (목) 15:46:28 · 1720 · 2
11.jpg
위와 같이 제목을 클릭하면 관련 정보가 뜨도록 레이어를 만들었는데

희안하게 익스9에서만 작동하고 크롬과 파이어폭스에서는 작동을 하지 않습니다

혹시 익스전용 명령을 쓴게 아닌가해서 분석해보았는데 별다른 특징을 찾지못했습니다

아래는 해당 php의 레이어 관련 소스이며 해당 URL은

http://www.gamereporters.com/bbs/board.php?bo_table=schedule 입니다

답변부탁드려요



<script language="JavaScript">
<!--
function namosw_goto_byselect(sel, targetstr)
{
var index = sel.selectedIndex;
if (sel.options[index].value != '') {
if (targetstr == 'blank') {
window.open(sel.options[index].value, 'win1');
} else {
var frameobj;
if (targetstr == '') targetstr = 'self';
if ((frameobj = eval(targetstr)) != null)
frameobj.location = sel.options[index].value;
}
}
}


// 레이어 뷰 스크립트
var iDelay = 80 // Delay to hide in milliseconds
var iNSWidth=250 // Default width for netscape
var sDisplayTimer = null, oLastItem

function getRealPosition(i,which) {
iPos = 0
while (i!=null) {
iPos += i["offset" + which]
i = i.offsetParent
}
return iPos
}
function showLayers(sDest,itop,ileft,iWidth) {
if (document.all!=null) {
var i = window.event.srcElement
stopTimer()
dest = document.all[sDest]
if ((oLastItem!=null) && (oLastItem!=dest))
hideItem()
if (dest) {
// Netscape Hack
if (i.offsetWidth==0)
if (iWidth)
i.offsetWidth=iWidth
else
i.offsetWidth=iNSWidth;
if (ileft)
dest.style.pixelLeft = ileft
else
dest.style.pixelLeft = getRealPosition(i,"Left") - 5 // 불러오는 메뉴 좌표
// dest.style.pixelLeft = getRealPosition(i,"Left") + i.offsetWidth *0.1 // 불러오는 메뉴 좌표
if (itop)
dest.style.pixelTop = itop
else
dest.style.pixelTop = getRealPosition(i,"Top") + 15 // 불러오는 메뉴 좌표
dest.style.visibility = "visible"
}
oLastItem = dest
}
}

function stopTimer() {
clearTimeout(sDisplayTimer)
}

function startTimer(el) {
if (!el.contains(event.toElement)) {
stopTimer()
sDisplayTimer = setTimeout("hideItem()",iDelay)
}
}

function hideItem() {
if (oLastItem)
oLastItem.style.visibility="hidden"
}

function checkOver() {
if ((oLastItem) && (oLastItem.contains(event.srcElement))) {
stopTimer()
}
}

function checkOut() {
if (oLastItem==event.srcElement)
startTimer(event.srcElement)
}

document.onclick = checkOver
document.onclick = checkOut
//-->
</SCRIPT>

---------------------------------------------------------------
<?

$j=0; // layer id
// 내용을 보여주는 부분
while ($row = mysql_fetch_array($result)) {

if( substr($row[wr_link1],0,6) < $year.$cel_mon ) {
$start_day =1;
$start_day= (int)$start_day;
} else {
$start_day = substr($row[wr_link1],6,2);
$start_day= (int)$start_day;
}

if( substr($row[wr_link2],0,6) > $year.$cel_mon ) {
$end_day = $lastday[$month];
$end_day= (int)$end_day;
} else {
$end_day = substr($row[wr_link2],6,2);
$end_day= (int)$end_day;
}

for ($i = $start_day ; $i <= $end_day; $i++) {

$j++; // layer ID

switch ($row[wr_3]) {
case 1 :
$html_day[$i].= "<br><img src='$board_skin_path/img/1.png' border=0 align=absmiddle>";

~~~생략

$html_day[$i].= "<a onclick=\"showLayers('popup_schd".$j."')\" onclick=\"startTimer(this)\"
style='font-family:NanumGothicBoldWeb; cursor:pointer;'>["
.$row[ca_name]."]".$row[wr_subject]."</a>"."<br>"."\n";

$list[$i][file]=get_file($bo_table, $row[wr_id]); ?>

---------------------------------------------------------------

<DIV ID="popup_schd<?=$j?>" onclick="startTimer(event.srcElement)" style="BORDER-RIGHT: #DFDFDF 1px solid; BORDER-TOP: #DFDFDF 1px solid; BORDER-LEFT: #DFDFDF 1px solid; BORDER-BOTTOM: #DFDFDF 1px solid; BACKGROUND-COLOR: #ffffff; padding: 5 5 5 5; POSITION: absolute; top:-200px; visibility: hidden; Z-INDEX: 1; font-family: NanumGothicBoldWeb;">

---------------------------------------------------------------

첨부파일

11.jpg (61.8 KB)
0회 2013-06-13 15:46
|

댓글 2개

2013-06-13 (목) 17:12:32
스크립트를 바꾸셔야 할듯 하네요
http://www.jacklmoore.com/colorbox/
불량학생님 답변감사합니다 잘 참고하겠습니다
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-06-13 조회 1,678
13-06-13 조회 1,721
13-06-13 조회 2,121
13-06-13 조회 1,909
13-06-13 조회 5,325
13-06-13 조회 1,669
13-06-13 조회 1,149
13-06-13 조회 904
13-06-13 조회 1,677
13-06-13 조회 2,200
13-06-13 조회 1,064
13-06-13 조회 2,630
13-06-13 조회 1,761
13-06-13 조회 1,404
13-06-12 조회 888
13-06-12 조회 1,996
13-06-12 조회 1,222
13-06-12 조회 1,651
13-06-12 조회 930
13-06-12 조회 1,732