开发者

jquery datepicker with $.post() in yii framework

开发者 https://www.devze.com 2023-03-31 04:26 出处:网络
I\'m trying to use the jquery datepicker. What I need to do is to call an action search that return the result with the selected date.

I'm trying to use the jquery datepicker. What I need to do is to call an action search that return the result with the selected date. The problem is that I have the开发者_JAVA技巧 html response correct but I don't know how to render it. I still always in the same page.

here is the jquery post code:

function(formated, dates) {
                    $.post(
                        'diary',
                        {'date' : formated },
                        'html');

                },

Thanks


Are you looking for the load method? You can use it to replace the contents of an element in your page (e.g. a <div> placed specifically for this purpose) with the HTML that gets returned by the AJAX call.

Take a look at the examples on the jQuery documentation page to see if this is what you are after.


Yep thanks. here is how I solved it.

$('#result').load('diary', {'date' : formated});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号