\"walls/form\") ) %>\"); display me" />
开发者

rails remote form

开发者 https://www.devze.com 2023-03-16 19:04 出处:网络
$(\"#wall_add\").html(\"<%= escape_javascript( render(:partial => \"walls/form\") ) %>\"); display me

$("#wall_add").html("<%= escape_javascript( render(:partial => "walls/form") ) %>");

display me

<form accept-charset="UTF-8" action="/walls" class="new_wall" id="new_wall" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="9QBC/0uUIH2xJdZBcvTZb9开发者_如何学GoNsm1kL2hFipQq6NUdmCzU=" /></div> <div class="field"> <label for="wall_content">Content</label><br /> <textarea cols="40" id="wall_content" name="wall[content]" rows="20"></textarea> </div> <div class="actions"> <input name="commit" type="submit" value="Create Wall" /> </div> <input id="recipient" name="recipient" type="hidden" value="2" /> </form>

as text but not as html elements, http://deeflow.com/changer/remote.png


You need to call html_safe

$("#wall_add").html("<%= escape_javascript( render(:partial => "walls/form").html_safe ) %>");
0

精彩评论

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