게시글 작성완료후 얼럿창 띄우고 특정주소로 이동
본문
본 내용과 같이 게시글이 완료되면 "정상입력되었습니다"라고 얼럿창이 뜨고 해당 주소로 이동하게 작업했습니다.
write_update.tail.skin.php 파일안에
<? if($board['bo_8_subj'] != "") goto_url($board['bo_8_subj'] . $qstr); ?>
<? alert("정상입력되었습니다", http://naver.com); ?>
그런데 얼럿창에 내용이 뜨고 해당주소로 이동이 되는데 얼럿창 글이 깨집니다.
글깨지는거 어떡해해야 올바르게 나올까요?
부탁드려요
답변 6
<? alert("정상입력되었습니다", http://naver.com); ?>
부분은
<? alert("정상입력되었습니다", "http://naver.com"); ?>
이렇게 설정하는게 일단은 맞을 듯 합니다.
아 작성을 잘못했네요. 지금 그렇게 설정이 되어있습니다.
그런데 왜 얼럿창에 글이 깨질까요?
흑흑
utf-8로 저장되어있습니다.
내용은
<? if($board['bo_8_subj'] != "") goto_url($board['bo_8_subj'] . $qstr); ?>
<? alert("정상입력되었습니다", "http://hgnavi.co.kr"); ?>
이렇게 되어 있습니다.
해당 페이지가 header.php 되어 있습니다. 다 지웟는데도 안되네요.. 흑흑
<!DOCTYPE phpl PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xphpl1/DTD/xphpl1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<head>
<title>:: 현대지니네비게이션 서비스센터 ::</title>
<meta name="description" content="현대지니네비게이션 서비스센터">
<meta name="keywords" content="현대지니네비게이션 서비스센터">
<link href="http://hgnavi.co.kr/g5/include/css.css" rel="stylesheet" type="text/css">
<link href="http://hgnavi.co.kr/g5/include/sub_lyout.css" rel="stylesheet" type="text/css">
<script src="http://hgnavi.co.kr/g5/include/link.js"></script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('../image/top_nav_ov2.gif','../image/top_nav_ov3.gif','../image/top_nav_ov5.gif','../image/top_nav_ov1.gif','../image/top_nav_ov4.gif')">
<!-- 상단 메뉴 -->
<div id="main_header">
<div style="position:absolute; left:0px; top:0px; width:960px;z-index:9999;">
<table width="960" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="350"><img src="../image/top_0413_1.gif" /></td>
<td width="260" height="89" align="center" valign="middle"><a href="javascript:main();"><img src="../image/top_0413_2.gif" width="169" height="50" /></a></td>
<td width="350" align="right"><img src="../image/top_0413_3.gif" width="162" height="23" /></td>
</tr>
<tr>
<td colspan="3"><table width="960" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="66"> </td>
<td width="107"><a href="javascript:sub0101();" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','../image/top_nav_ov1.gif',1)"><img src="../image/top_nav_1.gif" name="Image11" width="107" height="51" border="0" id="Image11" /></a></td>
<td width="54"> </td>
<td width="151"><a href="javascript:sub0201();" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','../image/top_nav_ov2.gif',1)"><img src="../image/top_nav_2.gif" name="Image3" width="151" height="51" border="0" id="Image3" /></a></td>
<td width="54"> </td>
<td width="131"><img src="../image/top_nav_ov3.gif" width="131" height="51" /></td>
<td width="54"> </td>
<td width="110"><a href="javascript:sub0401();" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','../image/top_nav_ov4.gif',1)"><img src="../image/top_nav_4.gif" name="Image12" width="110" height="51" border="0" id="Image12" /></a></td>
<td width="52"> </td>
<td><a href="javascript:sub0501();" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','../image/top_nav_ov5.gif',1)"><img src="../image/top_nav_5.gif" name="Image6" width="110" height="51" border="0" id="Image6" /></a></td>
<td width="71"> </td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>
<!-- 상단 메뉴의 마지막 -->
<!-- 본문 코딩 -->
<div id="contents">
<div id="cont_top"><img src="http://hgnavi.co.kr/g5/sub3/image/top_img.gif" />
</div>
<? include ("left_menu.php") ?>
<div id="cont_right"><div style="width:40px; height:300px; background-color:#fff ; position:absolute; margin:0 0 0 -40px; "></div>
혹 스킨파일에서 write.skin.php 내용중에서
<div class="btn_confirm">
<input type="submit" value="작성완료" id="btn_submit" accesskey="s" class="btn_submit">
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel">취소</a>
</div>
</form>
이부분에 <? alert("정상입력되었습니다", "http://hgnavi.co.kr"); ?> 이걸 적용하면 안될까요?
어디부분에 넣어야 하나요?