Search the Community
Showing results for tags 'javascrip'.
-
Hi guys, I am trying to display tour information in fullcalendar but nothing is happening and no errors. Here is the php code from fetch-tours.php <?php require_once "config.php"; $json = array(); $sqlQuery = "SELECT * FROM jobs ORDER BY id"; $result = mysqli_query($con, $sqlQuery); $eventArray = array(); while ($row = mysqli_fetch_assoc($result)) { $title = isset($row['name']); $start = isset($row['dep_date']); $end = isset($row['ret_date']); $eventsArray['title'] = $title; $eventsArray['start'] = $start; $eventsArray['end'] = $end; array_push($eventArray, $row); } mysqli_free_result($result); mysqli_close($con); echo json_encode($eventArray); ?> And here is the Javascript that displays the calendar: <script type="text/javascript"> $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $('#calendar').fullCalendar( { header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, editable :true, events: "includes/fetch-tours.php", }); }) </script> The calendar displays fine but just no data. Any help is greatly appreciated. Cheers, Dan
- 8 replies
-
- fullcalendar
- javascrip
-
(and 2 more)
Tagged with:
-
Hi, I'm trying to get my first lines in PHP. I have read some tutorials, but since I'm not a programer is a little hard for me to get it straight. Could someone help me out to put the following javascript into php so I could just call php from my HTML, something like MySelect and get the selector. <h3><font color="#3EA99F">Categories</font></h3> <select id="mySelect" onchange="if(this.options[this.selectedIndex].value != ''){window.top.location.href=this.options[this.selectedIndex].value}"> <option>Select an option</option> <option value="site1">Orange</option> <option value="site2">Pineapple</option> <option value="site3">Banana</option> </select> Thank you so much More Explanation: I want to have something like MyFile.php where I have definied the Selector, so I can call MySelect from Index.html and write the select in the html, so If I have 400 .html pages, I do not have to change the code in the 400 pages if I want to add a value or make any change, but just made the change in MyFile.php.