0
私のモーダルは、タイトル以外の出力(空のモーダル)を表示しません。私はチェックして、私はモーダル内でそれを表示しないときに出力が動作しています。計算出力がモーダルで表示されない
出力を表示するにはどうすればよいですか?
<script>
$(function() {
$("#mortgageResults").dialog({
autoOpen: false,
modal: false,
resizable: false,
autoResize: true,
show: {
effect: "clip",
duration: 400
},
hide: {
effect: "drop",
duration: 400
}
});
$("#mortgagebtn").on("click", function() {
$("#mortgageResults").dialog("open");
return false;
});
});
</script>
計算:
<div id="calculator_one">
<?php
$borrow = $_POST['borrow']; //amount borrowed
$interest = $_POST['interest']; //interest rate
$term = $_POST['term']; //term
$months = ($term * 12);
$answer = ($borrow * ($interest/100))/12;
$answer_two = ($borrow * (($interest/12)/100)/(1 - pow(1 + (($interest/12)/100), -$months))); ?>
<form id="calcualtor" action="" method="post" class="calculator">
<label class="calcAmount">Amount to borrow (₱)</label>
<input class="calcAmount" type="text" name="borrow" maxlength="6" />
<br />
<label class="calcInterest">Interest (%)</label>
<input class="calcInterest" type="text" name="interest" maxlength="4" />
<br />
<label class="calcTerm">Term (Years)</label>
<input class="calcTerm" type="text" name="term" maxlength="2" />
<br />
<button id="mortgagebtn" type="submit">Calculate</button>
</form>
</div>
私のディスプレイ出力:
<div id="mortgageResults" title="Mortgage Results">
<?php
if (isset($_POST['mortgagebtn'])){
echo "<p class='calc_header'>Results</p>";
echo "<div id='results'><p class='calc_result'>Based on borrowing <span class='mortgage'>₱", number_format($borrow) , "</span> over <span class='mortgage'>", ($term), " years</span> at <span class='mortgage'>", ($interest), "%</span>, your monthly repayments would be:</p>";
echo "<p class='calc_result'>Interest Only <span class='mortgage'>₱", number_format($answer,2), "</span></p>";
echo "<p class='calc_result'>Repayment <span class='mortgage'>₱", number_format($answer_two,2), "</span></p></div>";} ?>
</div>
私は実際にそれを試みました、私は "入力"としてそれを変更しようとしてもまだ動作しません。モーダルのみが空に戻ります。 – Rye