前提・実現したいこと
カレンダーの日付をクリックしてその日付のページにPHPでGET送信したいのですがわかりません。
Fullcalendarを利用しているのでHTMLの記述がdivタグのみでFormを書いても送信できない状態です。
やはりsubmitボタンをつけないとできないのでしょうか?
該当のソースコード
html
1<div id='contents'> 2 <!-- タイトル --> 3 <h1 id="title">予約状況一覧</h1> 4 <hr id="title-border"> 5 <!-- end --> 6 <!-- カレンダー --> 7 <form action="listDetail.php" method="get"> 8 <div id='calendar'></div> 9 </form> 10 <!-- end --> 11 </div>
js
1<script> 2 // ページ読み込み時の処理 3 $(document).ready(function() { 4 5 // カレンダーの設定 6 $('#calendar').fullCalendar({ 7 eventSources: [{ 8 googleCalendarApiKey: '********************************', 9 googleCalendarId: 'japanese__ja@holiday.calendar.google.com', 10 rendering: 'background', 11 color: "#ffe4e4", 12 }], 13 height: 550, 14 lang: "ja", 15 selectable: true, 16 selectHelper: true, 17 18 select: function(start, end, jsEvent, view) { 19 //wrtie your redirection code here 20 window.location = "/project/view/listDetail.php"; 21 }, 22 editable: true, 23 eventLimit: true, // allow "more" link when too many events 24 25 }); 26 27 }); 28 29 </script>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/29 03:12
退会済みユーザー
2018/11/29 03:16
2018/11/29 03:45