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" />&nbsp;&nbsp;<span>Saving...</span></div><br></br>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Apr-05 12:51 UTC
Re: Inplace edit for rails displaying me the whole code content.
On 5 April 2011 13:47, Sasi <ssasidaran86-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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> > 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" / >>&nbsp;&nbsp;<span>Saving...</span></div><br></br> > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sasi
2011-Apr-05 13:02 UTC
Re: Inplace edit for rails displaying me the whole code content.
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> <td><%=in_place_text_field :vale_store, :upper%></ td> </tr> <%end%> On Apr 5, 5:51 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 5 April 2011 13:47, Sasi <ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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 > > > > > > > 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" / > >>&nbsp;&nbsp;<span>Saving...</span></div><br></br> > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - > > - Show quoted text --- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Apr-05 13:17 UTC
Re: Re: Inplace edit for rails displaying me the whole code content.
On 5 April 2011 14:02, Sasi <ssasidaran86-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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> > <td><%=in_place_text_field :vale_store, :upper%></ > td> > </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> > > > On Apr 5, 5:51 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 5 April 2011 13:47, Sasi <ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > 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 >> >> >> >> >> >> > 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" / >> >>&nbsp;&nbsp;<span>Saving...</span></div><br></br> >> >> > -- >> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. >> > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. >> > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - >> >> - Show quoted text - > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Apr-05 13:28 UTC
Re: Re: Inplace edit for rails displaying me the whole code content.
On 5 April 2011 14:17, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 5 April 2011 14:02, Sasi <ssasidaran86-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> 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> >> <td><%=in_place_text_field :vale_store, :upper%></ >> td> >> </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> > Colin > >> >> >> >> On Apr 5, 5:51 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>> On 5 April 2011 13:47, Sasi <ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>> > 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 >>> >>> >>> >>> >>> >>> > 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" / >>> >>&nbsp;&nbsp;<span>Saving...</span></div><br></br> >>> >>> > -- >>> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. >>> > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. >>> > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - >>> >>> - Show quoted text - >> >> -- >> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Apr-05 13:33 UTC
Re: Re: Inplace edit for rails displaying me the whole code content.
On Apr 5, 2011, at 9:17 AM, Colin Law wrote:> 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, 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Apr-05 13:37 UTC
Re: Re: Inplace edit for rails displaying me the whole code content.
On 5 April 2011 14:33, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> > On Apr 5, 2011, at 9:17 AM, Colin Law wrote: > >> 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, 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.Our posts crossed, you are correct of course. Senility setting in. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.