시나리오 :자바 스크립트 : 클릭 취소 할 때 프로그램을 종료
내가 가지고 confirmation pop up message
어디 그냥 진행됩니다 OK
버튼을 클릭하거나 내가 만든 항목을 저장할 때 -이 .. 괜찮습니다하지만 때 나는 그것이 booking_content.php
의 페이지로 돌아갈 것이다 CANCEL
버튼을 클릭 - ...이 하나가 괜찮
문제 :
문제는 이제함께3210, 다시 페이지로 돌아가는 것은 좋지만 its still saving the entry which is when I pressed the
취소 it will not save and will return back to the page of
예약 _ 내용 .PHP`입니다.
질문 :
*terminate the program*
하는 방법 나는 CANCEL
을 클릭 있는가? 당신은 그 PHP가 실행을 실현 할
// other if else..
else if($network == "Mass and Mobile" && $row[fldTotalDuration] == "08:00:00" && $duration >= "0 s")
{?><?php
if(sizeof($bldg) == 1)
{
echo "<script type='text/javascript'>\n";
echo "alert('$bldg[$i] station is already full.');\n";
echo "window.location='booking_content.php'";
echo "</script>";
}
else
{ ?>
<script>
var r=confirm('$bldg[$i] station is already full. Do you want to save the other networks?')
if (r==true) {
alert("OKAY BUTTON");
} else {
window.location='booking_content.php';
}
</script>
<?php
}
}
//after all the if else...
else
{
// heres my code for saving the data....
}
가 사전에 감사합니다 ...
"프로그램 종료"란 정확히 무슨 뜻입니까? 웹 서버를 죽이시겠습니까? – slebetman
@slebetman .... 아니오 .. 죄송합니다 ... 현재로서는 취소를 누를 때 저장이 계속됩니다 .... 원하는 경우 .... 취소를 클릭하면 booking_content.php 그러면 데이터도 저장되지 않습니다. – user2826499