Hi!!

I don't have my exactly code here because it's at work. I'll see it
just tomorrow. But I remember quite good what I've done.

It's something like this my jQuery:

$("#myDatePicker").datepicker({ onSelect: function(date) { return
window.location.href("/Admin/Schedule/?date=" + date; }

And I have my C# method that takes this "date", treats it and returns
all events that happens in this "date". And, this way, the page
refreshes (because of the window.location.href) and my list of events
is shown.

But, like I've said, the page is refreshing and I didn't want that!!
So, I was thinking on a Ajax solution to pass the selected date and
returns me the events, without refreshing.

Thanks!!!

André




On 10 fev, 23:41, pedalpete <p...@hearwhere.com> wrote:
> without seeing your jquery, it's tough to say exactly what is going
> on,
> but have you got 'return false;' at the end of your select function?
> That stops the page from submitting (refreshing).
>
> On Feb 10, 5:32 pm, AndreMiranda <acymira...@gmail.com> wrote:
>
> > Hi!!
>
> > I have a page with DatePicker and a list of events that occur in some
> > respective date. So, when a person selects a date in DatePicker, this
> > date is passed as an argument to a method (I'm using asp.net mvc) and
> > this method returns me all the events of the chosen date.
>
> > The problem is the page refreshes every time this process is done.
>
> > So, what's the best way to make this via Ajax?? $.ajax.get??
> > $.ajax.post?? What do you recommend?
>
> > And how can I when update this list events of my page??
>
> > Thanks in advance!!
>
> > André

Reply via email to