Note that there are some explanatory texts on larger screens.

plurals
  1. POchanging fullcalendar's events option using jquery/ajax
    primarykey
    data
    text
    <p>I am using fullCalendar plugin to display available rooms.</p> <blockquote> <pre><code>&lt;script&gt; var $c = jQuery.no Conflict(); $c(document).ready(function() { $c('#calendar').fullCalendar({ monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'], dayNamesShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'], height: 530, theme: true, firstDay: 1, month:8, events: "json-events.php?roomtype_id=5&lt;?//=$_GET['rtype']?&gt;", eventDrop: function(event, delta) { alert(event.title + ' was moved ' + delta + ' days\n' + '(should probably update your database)'); }, loading: function(bool) { if (bool) $c('#loading').show(); else $c('#loading').hide(); } }); }); &lt;/script&gt; </code></pre> </blockquote> <p>and I have a selectbox.</p> <pre><code>&lt;select name="side_room_type" id="room_type" class="input-medium"&gt; &lt;option value="0"&gt;Select Room Type&lt;/option&gt; &lt;option value="5"&gt;Family Room&lt;/option&gt; &lt;option value="7"&gt;Seaside Rooms&lt;/option&gt; &lt;/select&gt; </code></pre> <p>I can display available rooms by using;</p> <p>events: "json-events.php?roomtype_id=xxx"</p> <p>and getting data from it. I am trying to get the selected option value and change the "events" value using it. If Seaside Room is selected it should change events from this: </p> <p>events: "json-events.php?roomtype_id=5</p> <p>to this:</p> <p>events: "json-events.php?roomtype_id=7</p> <p>and of course it should get available rooms without refreshing the page.</p> <p>I will be glad if you can help me with this matter.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload