경고창 후 페이지 이동과 동시에 팝업창 띄우기 정보
경고창 후 페이지 이동과 동시에 팝업창 띄우기본문
아래는 update.php 내용의 일부 입니다.
alert("상담이 신청되었습니다.", "{$g4[path]}/");
이렇게 되면 경고창 뜨고 홈페이지 첫화면으로 이동합니다.
구현하고 싶은것은?
페이지 이동과 동시에 팝업창을 띄우려고 하는데 어떻게 해야 할까요?
alert("상담이 신청되었습니다.", "{$g4[path]}/");
이렇게 되면 경고창 뜨고 홈페이지 첫화면으로 이동합니다.
구현하고 싶은것은?
페이지 이동과 동시에 팝업창을 띄우려고 하는데 어떻게 해야 할까요?
댓글 전체

die("<script type=text/javascript>alert("상담이 신청");window.open(띄울창-이건네이버쳐보면많이나와요);location.href='http://gnucomun.net/';</script>");
http://blog.naver.com/jasonbae6/20059429108
http://blog.naver.com/jasonbae6/20059429108
<?
include_once("./_common.php");
alert('상담이 신청'); window.open(menu_win); location.href='{$g4[path]}/';
?>
이렇게 했는데 안되네요?
include_once("./_common.php");
alert('상담이 신청'); window.open(menu_win); location.href='{$g4[path]}/';
?>
이렇게 했는데 안되네요?

<?
include_once("./_common.php");
echo "<script>alert('상담이 신청'); window.open(menu_win); location.href='{$g4[path]}/'; </script>";
?>
그리고 menu_win이라는 변수에 주소가 정의되어있나요?
include_once("./_common.php");
echo "<script>alert('상담이 신청'); window.open(menu_win); location.href='{$g4[path]}/'; </script>";
?>
그리고 menu_win이라는 변수에 주소가 정의되어있나요?

/lib/common.lib.php 에서
function alert($msg='', $url='')
{
global $g4;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
//header("Content-Type: text/html; charset=$g4[charset]");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4[charset]\">";
echo "<script language='javascript'>alert('$msg');";
if (!$url)
echo "history.go(-1);";
echo "</script>";
if ($url)
// 4.06.00 : 불여우의 경우 아래의 코드를 제대로 인식하지 못함
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url($url);
exit;
}
이렇게 된 부분을 살펴보세요. 그래야 이해가 되실 것 같네요.
function alert($msg='', $url='')
{
global $g4;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
//header("Content-Type: text/html; charset=$g4[charset]");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4[charset]\">";
echo "<script language='javascript'>alert('$msg');";
if (!$url)
echo "history.go(-1);";
echo "</script>";
if ($url)
// 4.06.00 : 불여우의 경우 아래의 코드를 제대로 인식하지 못함
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url($url);
exit;
}
이렇게 된 부분을 살펴보세요. 그래야 이해가 되실 것 같네요.
간단하게 update.php를
alert("상담이 신청되었습니다.", "{$g4[path]}/?popup=yes");
이런식으로 수정한 후 index.php 파일에
if ($popup == 'yes') {
팝업 코드
}
이렇게 하시면 될 것 같은데요...
alert("상담이 신청되었습니다.", "{$g4[path]}/?popup=yes");
이런식으로 수정한 후 index.php 파일에
if ($popup == 'yes') {
팝업 코드
}
이렇게 하시면 될 것 같은데요...