코딩 질문요 정보
코딩 질문요본문
아래의 코딩에서 이미지맵의 링크가 걸린부분을
클릭할시에 팝업창이 나오면서 400x300의 이미지가
나타나야 합니다. php코딩으로 제작되어있습니다ㅠㅠ
가능한 코딩을 몰라서 질문합니다.
답변부탁드립니다ㅠㅠ
------------------------코딩--------------------------------
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.php");
?>
<!-- 메인화면 시작 -->
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="960" height="250">
<param name="movie" value="/images/sub_movie03.swf">
<param name="quality" value="high">
<PARAM NAME=wmode VALUE=transparent>
<embed src="/images/sub_movie03.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="960" height="250"></embed>
</object></td>
</tr>
</table>
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="15" colspan="2"></td>
</tr>
<tr>
<td width="190" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="190" height="360">
<param name="movie" value="/images/left_nav03.swf">
<param name="quality" value="high">
<PARAM NAME=wmode VALUE=transparent>
<embed src="/images/left_nav03.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="190" height="360"></embed>
</object></td>
<td width="770" valign="top">
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/title03.gif" align="absmiddle" border="0" /></td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="4"></td>
</tr>
<tr>
<td width="151"><a href="/sub03.php"><img src="../images/sub03_01_tabover_01.gif" align="absmiddle" border="0" /></a></td>
<td width="151"><a href="/sub03_01.php"><img src="../images/sub03_01_tab_02.gif" align="absmiddle" border="0" /></a></td>
<td width="151"><a href="/sub03_02.php"><img src="../images/sub03_01_tab_03.gif" align="absmiddle" border="0" /></a></td>
<td> </td>
</tr>
<tr>
<td height="10" colspan="4"></td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/sub03_01_01.jpg" border="0" align="absmiddle" usemap="#pop1" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="15" colspan="2"></td>
</tr>
</table>
<!-- 메인화면 -->
<?
include_once("./_tail.php");
?>
<map name="pop1" id="pop1">
<area shape="rect" coords="51,1121,251,1271" href="#" />
<area shape="rect" coords="286,1121,486,1271" href="#" />
<area shape="rect" coords="519,1122,721,1271" href="#" />
<area shape="rect" coords="51,1301,251,1452" href="#" />
<area shape="rect" coords="286,1303,486,1453" href="#" >
<area shape="rect" coords="521,1303,719,1451" href="#" >
</map>
클릭할시에 팝업창이 나오면서 400x300의 이미지가
나타나야 합니다. php코딩으로 제작되어있습니다ㅠㅠ
가능한 코딩을 몰라서 질문합니다.
답변부탁드립니다ㅠㅠ
------------------------코딩--------------------------------
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.php");
?>
<!-- 메인화면 시작 -->
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="960" height="250">
<param name="movie" value="/images/sub_movie03.swf">
<param name="quality" value="high">
<PARAM NAME=wmode VALUE=transparent>
<embed src="/images/sub_movie03.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="960" height="250"></embed>
</object></td>
</tr>
</table>
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="15" colspan="2"></td>
</tr>
<tr>
<td width="190" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="190" height="360">
<param name="movie" value="/images/left_nav03.swf">
<param name="quality" value="high">
<PARAM NAME=wmode VALUE=transparent>
<embed src="/images/left_nav03.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="190" height="360"></embed>
</object></td>
<td width="770" valign="top">
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/title03.gif" align="absmiddle" border="0" /></td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="4"></td>
</tr>
<tr>
<td width="151"><a href="/sub03.php"><img src="../images/sub03_01_tabover_01.gif" align="absmiddle" border="0" /></a></td>
<td width="151"><a href="/sub03_01.php"><img src="../images/sub03_01_tab_02.gif" align="absmiddle" border="0" /></a></td>
<td width="151"><a href="/sub03_02.php"><img src="../images/sub03_01_tab_03.gif" align="absmiddle" border="0" /></a></td>
<td> </td>
</tr>
<tr>
<td height="10" colspan="4"></td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/sub03_01_01.jpg" border="0" align="absmiddle" usemap="#pop1" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="15" colspan="2"></td>
</tr>
</table>
<!-- 메인화면 -->
<?
include_once("./_tail.php");
?>
<map name="pop1" id="pop1">
<area shape="rect" coords="51,1121,251,1271" href="#" />
<area shape="rect" coords="286,1121,486,1271" href="#" />
<area shape="rect" coords="519,1122,721,1271" href="#" />
<area shape="rect" coords="51,1301,251,1452" href="#" />
<area shape="rect" coords="286,1303,486,1453" href="#" >
<area shape="rect" coords="521,1303,719,1451" href="#" >
</map>
댓글 전체
방법은 여러가지가 있습니다만 그누보드를 사용하시니까 저라면 이렇게 하겠습니다.
그누보드에는 common.js 파일에 popup_window 함수가 이미 생성되어 있습니다.
그것을 이용하시면 됩니다.
먼저 popup.html 파일을 하나 만들어주시구요
그안에 <img src="./images/<?=$img_src?>.jpg" width="400" height="300" border="0" /> 형식으로 코딩을 해둡니다.
이때 src= 부분에는 변수로 처리해주고 팝업을 호출할때 이미지경로를 함께 넘겨주는 방식으로요.
그다음에 메인화면에 코딩으로 가서
<map name="pop1" id="pop1">
<area shape="rect" coords="51,1121,251,1271" href="javascript_:popup_window('./popup.html?img_src=img01', 'popname', 'width=400,height=300')" />
<area shape="rect" coords="286,1121,486,1271" href="javascript_:popup_window('./popup.html?img_src=img02', 'popname', 'width=400,height=300')" />
<area shape="rect" coords="519,1122,721,1271" href="javascript_:popup_window('./popup.html?img_src=img03', 'popname', 'width=400,height=300')" />
.
.
.
</map>
위 형식으로 img01, img02 .. 처럼 popup.html로 변수를 전달해주면 됩니다.
이해가 되셨는지요?^^
그누보드에는 common.js 파일에 popup_window 함수가 이미 생성되어 있습니다.
그것을 이용하시면 됩니다.
먼저 popup.html 파일을 하나 만들어주시구요
그안에 <img src="./images/<?=$img_src?>.jpg" width="400" height="300" border="0" /> 형식으로 코딩을 해둡니다.
이때 src= 부분에는 변수로 처리해주고 팝업을 호출할때 이미지경로를 함께 넘겨주는 방식으로요.
그다음에 메인화면에 코딩으로 가서
<map name="pop1" id="pop1">
<area shape="rect" coords="51,1121,251,1271" href="javascript_:popup_window('./popup.html?img_src=img01', 'popname', 'width=400,height=300')" />
<area shape="rect" coords="286,1121,486,1271" href="javascript_:popup_window('./popup.html?img_src=img02', 'popname', 'width=400,height=300')" />
<area shape="rect" coords="519,1122,721,1271" href="javascript_:popup_window('./popup.html?img_src=img03', 'popname', 'width=400,height=300')" />
.
.
.
</map>
위 형식으로 img01, img02 .. 처럼 popup.html로 변수를 전달해주면 됩니다.
이해가 되셨는지요?^^