info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org
2006-Jan-05 17:49 UTC
InPlaceEditor and textarea
Hi to all. First of all exchuse for my bad english I try to use Ajax.InPlaceEditor with a textarea: ################## new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'', { ajaxOptions: {method: ''get''}, rows:10, cols:20, callback: function(form, value) { return ''op=ipblock&value='' + value}, onBlur: function(request) {Element.show(''indicator'')}, onComplete: function(request) {Element.hide(''indicator'')} }); ################## I try to write 2 row, but when the form is submit I have only one row after send success. I must add some code to JS for use multirow textarea? Thank you Antonello
That sounds odd. Could you give us a dump of the request content as it comes back, please? On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote:> Hi to all. > > First of all exchuse for my bad english > > I try to use Ajax.InPlaceEditor with a textarea: > ################## > new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'', > { ajaxOptions: {method: ''get''}, > rows:10, > cols:20, > callback: function(form, value) { return ''op=ipblock&value='' + value}, > onBlur: function(request) {Element.show(''indicator'')}, > onComplete: function(request) {Element.hide(''indicator'')} > }); > ################## > > I try to write 2 row, but when the form is submit I have only one row > after send success. > > I must add some code to JS for use multirow textarea? > > Thank you > Antonello > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Btw, does it work if you don''t use method: ''get'' (and use the default ''post'') instead? On 1/6/06, Jon Tirsen <jon-fQK1VBTDpnXQT0dZR+AlfA@public.gmane.org> wrote:> That sounds odd. Could you give us a dump of the request content as it > comes back, please? > > On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: > > Hi to all. > > > > First of all exchuse for my bad english > > > > I try to use Ajax.InPlaceEditor with a textarea: > > ################## > > new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'', > > { ajaxOptions: {method: ''get''}, > > rows:10, > > cols:20, > > callback: function(form, value) { return ''op=ipblock&value='' + value}, > > onBlur: function(request) {Element.show(''indicator'')}, > > onComplete: function(request) {Element.hide(''indicator'')} > > }); > > ################## > > > > I try to write 2 row, but when the form is submit I have only one row > > after send success. > > > > I must add some code to JS for use multirow textarea? > > > > Thank you > > Antonello > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org
2006-Jan-05 21:47 UTC
Re: InPlaceEditor and textarea
Hi,> Btw, does it work if you don''t use method: ''get'' (and use the default > ''post'') instead?great :-) with post method the form send the correct value on multi-lines. well... now I must only display the two row on two line on web page after send success. I think I can try to replace the eol with a BR Thank you, Antonello> > On 1/6/06, Jon Tirsen <jon-fQK1VBTDpnXQT0dZR+AlfA@public.gmane.org> wrote: >> That sounds odd. Could you give us a dump of the request content as it >> comes back, please? >> >> On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: >> > Hi to all. >> > >> > First of all exchuse for my bad english >> > >> > I try to use Ajax.InPlaceEditor with a textarea: >> > ################## >> > new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'', >> > { ajaxOptions: {method: ''get''}, >> > rows:10, >> > cols:20, >> > callback: function(form, value) { return ''op=ipblock&value='' + >> value}, >> > onBlur: function(request) {Element.show(''indicator'')}, >> > onComplete: function(request) {Element.hide(''indicator'')} >> > }); >> > ################## >> > >> > I try to write 2 row, but when the form is submit I have only one row >> > after send success. >> > >> > I must add some code to JS for use multirow textarea? >> > >> > Thank you >> > Antonello >> > _______________________________________________ >> > Rails-spinoffs mailing list >> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > >> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Oh.... You mean that the two rows gets concatenated into one after a successful save? That''s just the nature of HTML. Yes, you would need to replace the EOL with a <BR> on the server. On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote:> Hi, > > Btw, does it work if you don''t use method: ''get'' (and use the default > > ''post'') instead? > great :-) with post method the form send the correct value on multi-lines. > > well... now I must only display the two row on two line on web page after > send success. > > I think I can try to replace the eol with a BR > > Thank you, > Antonello > > > > > > > On 1/6/06, Jon Tirsen <jon-fQK1VBTDpnXQT0dZR+AlfA@public.gmane.org> wrote: > >> That sounds odd. Could you give us a dump of the request content as it > >> comes back, please? > >> > >> On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: > >> > Hi to all. > >> > > >> > First of all exchuse for my bad english > >> > > >> > I try to use Ajax.InPlaceEditor with a textarea: > >> > ################## > >> > new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'', > >> > { ajaxOptions: {method: ''get''}, > >> > rows:10, > >> > cols:20, > >> > callback: function(form, value) { return ''op=ipblock&value='' + > >> value}, > >> > onBlur: function(request) {Element.show(''indicator'')}, > >> > onComplete: function(request) {Element.hide(''indicator'')} > >> > }); > >> > ################## > >> > > >> > I try to write 2 row, but when the form is submit I have only one row > >> > after send success. > >> > > >> > I must add some code to JS for use multirow textarea? > >> > > >> > Thank you > >> > Antonello > >> > _______________________________________________ > >> > Rails-spinoffs mailing list > >> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >> > > >> > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org
2006-Jan-05 21:58 UTC
Re: InPlaceEditor and textarea
> Oh.... You mean that the two rows gets concatenated into one after a > successful save?yes...> That''s just the nature of HTML. Yes, you would need > to replace the EOL with a <BR> on the server.I''m working with PHP and try to use nl2br function. The result isn''t correct, but you have confirm to me that this is the right way. Now I do other test. Thank you again, Antonello> > On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: >> Hi, >> > Btw, does it work if you don''t use method: ''get'' (and use the default >> > ''post'') instead? >> great :-) with post method the form send the correct value on >> multi-lines. >> >> well... now I must only display the two row on two line on web page >> after >> send success. >> >> I think I can try to replace the eol with a BR >> >> Thank you, >> Antonello >> >> >> >> > >> > On 1/6/06, Jon Tirsen <jon-fQK1VBTDpnXQT0dZR+AlfA@public.gmane.org> wrote: >> >> That sounds odd. Could you give us a dump of the request content as >> it >> >> comes back, please? >> >> >> >> On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: >> >> > Hi to all. >> >> > >> >> > First of all exchuse for my bad english >> >> > >> >> > I try to use Ajax.InPlaceEditor with a textarea: >> >> > ################## >> >> > new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'', >> >> > { ajaxOptions: {method: ''get''}, >> >> > rows:10, >> >> > cols:20, >> >> > callback: function(form, value) { return ''op=ipblock&value='' >> + >> >> value}, >> >> > onBlur: function(request) {Element.show(''indicator'')}, >> >> > onComplete: function(request) {Element.hide(''indicator'')} >> >> > }); >> >> > ################## >> >> > >> >> > I try to write 2 row, but when the form is submit I have only one >> row >> >> > after send success. >> >> > >> >> > I must add some code to JS for use multirow textarea? >> >> > >> >> > Thank you >> >> > Antonello >> >> > _______________________________________________ >> >> > Rails-spinoffs mailing list >> >> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> >> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> > >> >> >> > _______________________________________________ >> > Rails-spinoffs mailing list >> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On 1/6/06, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote:> > That''s just the nature of HTML. Yes, you would need > > to replace the EOL with a <BR> on the server. > I''m working with PHP and try to use nl2br function. The result isn''t > correct, but you have confirm to me that this is the right way. > Now I do other test.I don''t know much about PHP, but that sounds about right. Good luck!