作者squalll (開始)
看板Ajax
標題[問題] Ajax.InPlaceEditor
時間Mon Jan 7 20:20:08 2008
最近想要做像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
1F:推 xamous:test_result.php 會接到你送出的值,變數名稱是 'value' 01/07 23:32
2F:→ squalll:我在test_result.php這邊接受變數$_POST['value'] 都沒有 01/08 01:03
3F:→ squalll:接收到任何的值..而且程式碼也只有DIV的內容而已@@" 01/08 01:04
※ 編輯: squalll 來自: 140.115.126.234 (01/08 01:05)
4F:→ squalll:哈...原來是我自己觀念搞錯了! 謝謝 :) 01/08 01:26