Google 網上論壇首頁
說明 | 登入
How To Load Divs Asynchronous For Index.php? 討論的留言
您要留言的群組是 Usenet 群組。在此群組留言,網際網路上的任何使用者將可以看到您的電郵地址。
您的回覆郵件尚未寄出。
您已成功留言
 
寄件者:
收件人:
副本:
後續追蹤對象:
新增副本 | 新增後續追蹤對象 | 編輯主旨
主旨:
驗證:
為了確認,請輸入您在以下圖片中看到的字元,或輸入您按下存取圖示時所聽到的號碼。 注意聽並輸入您聽到的號碼
 
Tim  
檢視個人資料
 更多選項 2006年10月31日, 上午8時05分
寄件者: "Tim" <tdi...@gmail.com>
日期: Tue, 31 Oct 2006 00:05:54 -0000
當地時間: 2006年10月31日(星期二) 上午8時05分
主旨: Re: How To Load Divs Asynchronous For Index.php?
Hi Eric

If you look back again at Graham Bird's 'tutorial', in the view you'll
see an example of the $option['update'] option, I agree it's difficult
know from the documentation that you are supposed to remove the $option
and stick it in an array....

        print $ajax->link('Delete', 'delete/' . $item['id'],
array('update'=>'tasks_done'));

If you want to do it on load of the page you'll probably need an onload
event attached to the body tag.

This should call a function which (if you want to have it cakeified)
should maybe have one blocks of code for each div you want to update:

                        echo $ajax->remoteFunction(
                        array("url"=>"/controller/action/",
                                  "update"=>"divToUpdate",
                                  "type"=>"asynchronous"
                                  )
                        );

View the source after its run and you'll see it converts it to use the
prototype.js object Ajax.Updater

If you change the type to synchronous, each div should load one after
the other, rather than all at once.
Hope this helps

Tim


    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。

建立群組 - Google 網上論壇 - Google 首頁 - 服務條款 - 隱私權政策
©2009 Google