开发者

jquery datepicker with $.post() in yii framework

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜