지금 소스에서 이미지를 새창으로 띄우려면 어떻게? > 그누3질답

그누3질답

지금 소스에서 이미지를 새창으로 띄우려면 어떻게? 정보

지금 소스에서 이미지를 새창으로 띄우려면 어떻게?

본문

// 아래 소스가 여러가지 스크립트가 많이 들어가서
어떻게 해야 할지 모르겠어요. 이미지를 새창으로 띄워야 하는데 잘 안돼서 지금
그냥 target="_blank' 이렇게 해 버렸거든요 너무 보기 싫은데...
알려주시면 고맙겠습니다. http://inter.ganaan114.co.kr 이 곳에 가면 추천회원란에
중간에 스크롤 되면서 올라가는 항목 입니다.//

<SCRIPT language=javascript>
    var scrollerheight=200;    // 스크롤러의 세로
    var html,total_area=0,wait_flag=true; 
    var bMouseOver = 1;
    var scrollspeed = 1;        // Scrolling 속도       
    var waitingtime = 3000;    // 멈추는 시간
    var s_tmp = 0, s_amount = 200;
    var scroll_content=new Array();
    var startPanel=0, n_panel=0, i=0;
   
    function startscroll()
    { // 스크롤 시작
        i=0;
        for (i in scroll_content)
            n_panel++;
           
        n_panel = n_panel -1 ;
        startPanel = Math.round(Math.random()*n_panel);
        if(startPanel == 0)
        {
            i=0;
            for (i in scroll_content)
                insert_area(total_area, total_area++); // area 삽입
        }
        else if(startPanel == n_panel)
        {
            insert_area(startPanel, total_area);
            total_area++;
            for (i=0; i<startPanel; i++)
            {
                insert_area(i, total_area); // area 삽입
                total_area++;
            }
        }
        else if((startPanel > 0) || (startPanel < n_panel))
        {
            insert_area(startPanel, total_area);
            total_area++;
            for (i=startPanel+1; i<=n_panel; i++)
            {
                insert_area(i, total_area); // area 삽입
                total_area++;
            }
            for (i=0; i<startPanel; i++)
            {
                insert_area(i, total_area); // area 삽입
                total_area++;
            }
        }
        window.setTimeout("scrolling()",waitingtime);
    }
   
    function scrolling(){ // 실제로 스크롤 하는 부분
        if (bMouseOver && wait_flag)
        {
            for (i=0;i<total_area;i++){
                tmp = document.getElementById('scroll_area'+i).style;
                tmp.top = parseInt(tmp.top)-scrollspeed;
                if (parseInt(tmp.top) <= -scrollerheight){
                    tmp.top = scrollerheight*(total_area-1);
                }
                if (s_tmp++ > (s_amount-1)*scroll_content.length){
                    wait_flag=false;
                    window.setTimeout("wait_flag=true;s_tmp=0;",waitingtime);
                }
            }
        }
        window.setTimeout("scrolling()",1);
    }
   
    function insert_area(idx, n){ // area 삽입
        html='<div style="left: 0px; width: 100%; position: absolute; top: '+(scrollerheight*n)+'px" id="scroll_area'+n+'">\n';
        html+=scroll_content[idx]+'\n';
        html+='</div>\n';
        document.write(html);
    }
   
<?
$java_script = "";
for ($i=0; $i<count($list); $i++) {
$linker = "./?doc=bbs/gblink.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}&index=1";
if ($list[$i][file_image1]=="") $list[$i][file_image1]=noimage;
$mclub='<table style="font-family:굴림; color:rgb(51,51,51); line-height:150%;" width=100% cellpadding=1 cellspacing=0 border=0><tr><td width="170" align=center><a href='.$list[$i][file_image1].' target="_blank"><img src=\"'.$list[$i][file_image1].'\" width=\"130\" height=\"167\" border=0></a></td><td width="150" align=left><p style="line-height:180%;"><font color=\"#005cab\">  <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font> 아이디:</b> <b>'.$list[$i][subject].'</b></font></b><br> <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 결혼여부: '.$list[$i][wr_9].'<br> <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 국적: '.$list[$i][wr_4] .'<br> <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 출생년도: '.$list[$i][wr_2].'<br><b> <span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 직업: '.$list[$i][wr_6].'<br> <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 학력: '.$list[$i][wr_5].'<br> <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 거주지: '.$list[$i][wr_4].'<br> <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b> 신장: '.$list[$i][wr_3].'</font></p></td></tr></table>';
$java_script .= "scroll_content[$i]='$mclub'\n";
}
echo $java_script;
?>
</SCRIPT><? if ($is_category) echo " $category_name "; ?>


<DIV id="scroll_image" onmouseover=bMouseOver=0 style="left: 0px; width: 100%; position: relative; top: 0px; height: 170px; overflow:hidden;" onmouseout=bMouseOver=1>
    <SCRIPT>
startscroll();</SCRIPT>
</DIV>

댓글 전체

$java_script = "";

for ($i=0; $i<count($list); $i++) {

$size = @getimagesize("$list[$i][file_image1]");
$source_width  = $size[0];
$source_height = $size[1];

$linker = "./?doc=bbs/gblink.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}&index=1";

if ($list[$i][file_image1]=="") $list[$i][file_image1]=noimage;

$mclub='
<table style="font-family:굴림; color:rgb(51,51,51); line-height:150%;" width=100% cellpadding=1 cellspacing=0 border=0>
    <tr>
      <td width="170" align=center>
            <a href=\"javascript:;\" onclick=\"image_window('$list[$i][file_image1]', $source_width, $source_height);\">
            <img src=\"'.$list[$i][file_image1].'\" width=\"130\" height=\"167\" border=0>
            </a>
      </td>
      <td width="150" align=left>
          <p style="line-height:180%;">
          <font color=\"#005cab\"><b><span style="font-size:9pt;"><font color="#FF9900">⊙</font>
          아이디:</b> <b>'.$list[$i][subject].'</b></font></b><br>
          <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
            결혼여부: '.$list[$i][wr_9].'<br>
          <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
            국적: '.$list[$i][wr_4] .'<br>
          <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
          출생년도: '.$list[$i][wr_2].'<br>
          <b> <span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
          직업: '.$list[$i][wr_6].'<br>
          <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
          학력: '.$list[$i][wr_5].'<br>
          <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
          거주지: '.$list[$i][wr_4].'<br>
          <b><span style="font-size:9pt;"><font color="#FF9900">⊙</font></b>
          신장: '.$list[$i][wr_3].'</font></p>
      </td>
    </tr>
</table>';

$java_script .= "scroll_content[$i]='$mclub'\n";
}

echo $java_script;

너무 복잡하기도 하고.. 뭐가 뭔지.. 쩝.. 일단 이렇게 함해보세요

<? -------  ?> 사이 내용입니다.
전체 9,564
그누3질답 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT