[問題] Ajax.InPlaceEditor

看板Ajax作者 (開始)時間16年前 (2008/01/07 20:20), 編輯推噓1(103)
留言4則, 2人參與, 最新討論串1/1
最近想要做像flickr那樣點一下就可以編輯的功能 查到可以用prototype的Ajax.InPlaceEditor <div id="editor"> Click to Edit </div> <script language=javascript> function init() { var oEditor=new Ajax.InPlaceEditor("editor","test_result.php", { ajaxOptions: {method: 'post'}, externalControl:"externalControl", rows:5, cols:20, loadTextURL:"test_result.php", submitOnBlur:true } ); } Event.observe(window,'load',init); </script> 官方也有說明 http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor 可是我怎麼樣都找不到傳遞參數的方法啊~囧 他只能透過server端丟參數回來~問題是server不知道我client端的值阿=.=" 我目前想到是利用session去server查值~再丟回來! 這樣感覺有點笨@@ 不知道有沒有人用過類似的呢? 是否可以指點一下~~ m(_ _)m 謝謝大家了! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.126.234

01/07 23:32, , 1F
test_result.php 會接到你送出的值,變數名稱是 'value'
01/07 23:32, 1F

01/08 01:03, , 2F
我在test_result.php這邊接受變數$_POST['value'] 都沒有
01/08 01:03, 2F

01/08 01:04, , 3F
接收到任何的值..而且程式碼也只有DIV的內容而已@@"
01/08 01:04, 3F
※ 編輯: squalll 來自: 140.115.126.234 (01/08 01:05)

01/08 01:26, , 4F
哈...原來是我自己觀念搞錯了! 謝謝 :)
01/08 01:26, 4F
文章代碼(AID): #17WXZyRz (Ajax)