Sasi
(Sasi)
April 5, 2011, 12:47pm
1
Hi All,
Im using in_place_edit in my application ,for acheving this i have
used a plugin (super_inplace_controls). My rails version is 2.3.8
Insted of displaying the value and on click to provide the form for
editing. It is displaying me the whole code in the page.
as
0<form action="/setting/new_value/1" class="in_place_editor_form"
id="disposition_weight_lower_1_form" method="post"
onsubmit="jQuery.ajax({beforeSend:function(request)
{jQuery("#loader_disposition_weight_lower_1 ").show();
jQuery("#disposition_weight_lower_1_form ").hide();},
complete:function(request)
{jQuery("#loader_disposition_weight_lower_1 ").hide();},
data:jQuery.param(jQuery(this).serializeArray()) +
'&authenticity_token=' + encodeURIComponent('GNaJDLKf
+YYfq7VJlCM0JG9n0R1ffzLNrZTPzJvJJ28='), dataType:'script',
type:'post', url:'/configurations/set_disposition_weight_lower/1'});
return false;" style="display:none"><div style="margin:0;padding:
0;display:inline"><input name="authenticity_token" type="hidden"
value="GNaJDLKf+YYfq7VJlCM0JG9n0R1ffzLNrZTPzJvJJ28=" /></div><input
class="inplace_text_field" id="disposition_weight_lower"
name="disposition_weight[lower]" size="30" type="text" value="0" /
<input class="inplace_submit" name="commit" type="submit" value="OK" /
<a class="inplace_cancel" href="#"
onclick="jQuery("#disposition_weight_lower_1 ").show();
jQuery("#disposition_weight_lower_1_form ").hide();; return
false;">Cancel</a></form><div class="inplace_loader"
id="loader_disposition_weight_lower_1" style="display:none"><img
alt="Spinner" src="/images/spinner.gif?1275917204" /
Hi All,
Im using in_place_edit in my application ,for acheving this i have
used a plugin (super_inplace_controls). My rails version is 2.3.8
Insted of displaying the value and on click to provide the form for
editing. It is displaying me the whole code in the page.
Post here the code you are using to display the form. Otherwise how
are we supposed to guess what you may be doing wrong?
Colin
Sasi
(Sasi)
April 5, 2011, 1:02pm
3
Ya sure..
In controller at the top i have used..
in_place_edit_for :value_store, :lower
in_place_edit_for :value_store, :upper
and in views i have called the text filed as
<%for @value_store in @value_stores %>
<tr>
<td class="<%=@vale_store.colour%>"><
%=@vale_store.colour.capitalize%></td>
<td><%=in_place_text_field :value_store, :lower%></
<td><%=in_place_text_field :vale_store, :upper%></
</tr>
<%end%>
Ya sure..
Please don't top post, it makes it difficult to follow the thread.
Insert your reply at appropriate points in previous message. Thanks
In controller at the top i have used..
in_place_edit_for :value_store, :lower
in_place_edit_for :value_store, :upper
and in views i have called the text filed as
<%for @value_store in @value_stores %>
<tr>
<td class="<%=@vale_store.colour%>"><
%=@vale_store.colour.capitalize%></td>
<td><%=in_place_text_field :value_store, :lower%></
>
<td><%=in_place_text_field :vale_store, :upper%></
>
</tr>
<%end%>
Where in the above does the html you posted appear?
Did you realise that it is not valid html to put a form inside a td,
if that is what you are trying to do.
Colin
Ya sure..
Please don't top post, it makes it difficult to follow the thread.
Insert your reply at appropriate points in previous message. Thanks
In controller at the top i have used..
in_place_edit_for :value_store, :lower
in_place_edit_for :value_store, :upper
and in views i have called the text filed as
<%for @value_store in @value_stores %>
<tr>
<td class="<%=@vale_store.colour%>"><
%=@vale_store.colour.capitalize%></td>
<td><%=in_place_text_field :value_store, :lower%></
>
<td><%=in_place_text_field :vale_store, :upper%></
>
</tr>
<%end%>
Where in the above does the html you posted appear?
Did you realise that it is not valid html to put a form inside a td,
if that is what you are trying to do.
Sorry, talking out of my proverbial. Of course a form can be put inside a td.
Colin
Sorry, I disagree. Do you have a source for this? I just did a Textmate test of this: New XHTML document, type table and tab-expand it, click into the first TD, type form and expand it, validate at W3C. Completely valid.
Walter
Our posts crossed, you are correct of course. Senility setting in.
Colin