My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1028: Changing a eventSource with GET/POST parameters
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Jul 2011


Sign in to add a comment
 
Reported by vinigarc...@gmail.com, Jul 7, 2011
Hello,
I have a doubt about change the events in a calendar.

I did like this:
$(document).ready(function() {
	$('#calendar').fullCalendar({
		events: 'fonte_de_dados.php'
	});
}

It loads with a default events who are the same as 'fonte_de_dados.php?tipo_evento=0'

In my html I have a combobox like this:

<form name="seleciona_tipo_eventos" method="get" action="">
	Selecione o tipo do evento:
	<select id="tipo_evento" name="tipo_evento" onChange="<< function to change de calendar >>">
		<option value="0" selected 	>Todos os calendários</option>
		<option value="1"	  	>Acadêmico</option>
		<option value="2"	  	>Cursos</option>
		<option value="3"		>Outros Eventos</option>
	</select>
</form>

when we change a option the calendar must change and the new source must be 'fonte_de_dados.php?tipo_evento=<< option value >>'

How can I write the function on onChange to do this?

I'm really sorry about my english.
I had searched for it, but I hadn't found any information about this issue.

Thanks all!
Jul 13, 2011
#1 vinigarc...@gmail.com
uhm... nobody even read this?
Jul 19, 2011
Project Member #2 adamrs...@gmail.com
right now, your best bet is to write your own fetching function
http://arshaw.com/fullcalendar/docs/event_data/events_function/

... and have it make an ajax call with your parameter (probably just a global variable or something)

so you'd set this parameter before calling refetchEvents
http://arshaw.com/fullcalendar/docs/event_data/refetchEvents/
Status: Done
Sign in to add a comment

Powered by Google Project Hosting