Hi, I''ve downloaded the latest svn trunk and was glad to see that Ajax.InPlaceEditor forms can now be correctly submitted on Safari as well, with the server response being correctly displayed as well. The problem is, however, that clicking again on the same element (after sumbitting it first) will duplicate the submit form. The next attempt will triplicate it etc, etc... Could somebody on a Mac please confirm this behavior? I''m always worried that I am not doing something right before I submit a bug report. All best, Tench
Michael Zachariassen Krog
2005-Oct-02 04:43 UTC
[Rails-spinoffs] Ajax.InPlaceEditor on Safari & Firefox
Hi. I had some problems in safari using the inplaceeditor, but not quite the same i think. Placing the edittext within a td (<tr><td>email:</td><td>foo@bar.com</ td></tr>) resulted in the form being misplaced and not disappearing after submit, but putting the edittext within a span solved this issue. (<tr><td>email:</ td><td><span>foo@bar.com</span></td></tr>) Best Regards Michael Krog Den 01/10/2005 kl. 17.56 skrev Tench:> Hi, > > I''ve downloaded the latest svn trunk and was glad to see that > Ajax.InPlaceEditor forms can now be correctly submitted on Safari > as well, with the server response being correctly displayed as well. > > The problem is, however, that clicking again on the same element > (after sumbitting it first) will duplicate the submit form. The > next attempt will triplicate it etc, etc... > > Could somebody on a Mac please confirm this behavior? I''m always > worried that I am not doing something right before I submit a bug > report. > > All best, > Tench > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Yes, that''s correct. The in place editor completely replaces the tag it controls with the form element so the <td> would disappear (which confuses the hell out of most browsers). I should probably update the documentation with this fact. On 10/2/05, Michael Zachariassen Krog <mic@apaq.dk> wrote:> Hi. > > I had some problems in safari using the inplaceeditor, but not quite > the same i think. > Placing the edittext within a td (<tr><td>email:</td><td>foo@bar.com</ > td></tr>) resulted > in the form being misplaced and not disappearing after submit, but > putting the > edittext within a span solved this issue. (<tr><td>email:</ > td><td><span>foo@bar.com</span></td></tr>) > > Best Regards > Michael Krog > > Den 01/10/2005 kl. 17.56 skrev Tench: > > > Hi, > > > > I''ve downloaded the latest svn trunk and was glad to see that > > Ajax.InPlaceEditor forms can now be correctly submitted on Safari > > as well, with the server response being correctly displayed as well. > > > > The problem is, however, that clicking again on the same element > > (after sumbitting it first) will duplicate the submit form. The > > next attempt will triplicate it etc, etc... > > > > Could somebody on a Mac please confirm this behavior? I''m always > > worried that I am not doing something right before I submit a bug > > report. > > > > All best, > > Tench > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
I don''t think I''m getting this. Could you provide some more details? Maybe create a minimal HTML document that reproduces the problem? Are there any JavaScript errors? Cheers, Jon On 10/2/05, Tench <psychomachine@mac.com> wrote:> Hi, > > I''ve downloaded the latest svn trunk and was glad to see that > Ajax.InPlaceEditor forms can now be correctly submitted on Safari as > well, with the server response being correctly displayed as well. > > The problem is, however, that clicking again on the same element > (after sumbitting it first) will duplicate the submit form. The next > attempt will triplicate it etc, etc... > > Could somebody on a Mac please confirm this behavior? I''m always > worried that I am not doing something right before I submit a bug > report. > > All best, > Tench > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
I can''t host the example at the moment, but it''s really simple, so I will explain it as best as I can: My code looks like this: <p>a <a id="32" class="edit">simple</a> <a id="33" class=''edit''>paragraph</a></p> I am using behavior.js like this: ''.edit'' : function (element) { element.onclick = function() { new Ajax.InPlaceEditor(element.id, ''/textedit.php'', {}); } }, So, when I click on editable word for the first time, everything''s dandy. The form gets submitted and the new value displayed. But, if I click again on the same word (which was just edited), I get two input forms instead of one -- which looks like the attached image. -------------- next part -------------- A non-text attachment was scrubbed... Name: second.jpg Type: image/jpeg Size: 5521 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20051002/b3f37593/second.jpg -------------- next part -------------- If click OK on both forms, and try to click on the editable word again -- I will get three input forms etc. The same behavior occurs on Firefox. Now, Safari doesn''t produce any error messages with duplicate forms, but Firefox does: Error: [Exception... "''Permission denied to get property XULElement.selectedIndex'' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http:// test.dev/js/prototype.js :: anonymous :: line 850" data: no] Source File: http://test.dev/js/prototype.js Line: 850 I hope this helps. All best, Tench On 02. ??? 2005., at 10:14, Jon Tirsen wrote:> I don''t think I''m getting this. Could you provide some more details? > Maybe create a minimal HTML document that reproduces the problem? Are > there any JavaScript errors? > > Cheers, > Jon > > On 10/2/05, Tench <psychomachine@mac.com> wrote: > >> Hi, >> >> I''ve downloaded the latest svn trunk and was glad to see that >> Ajax.InPlaceEditor forms can now be correctly submitted on Safari as >> well, with the server response being correctly displayed as well. >> >> The problem is, however, that clicking again on the same element >> (after sumbitting it first) will duplicate the submit form. The next >> attempt will triplicate it etc, etc... >> >> Could somebody on a Mac please confirm this behavior? I''m always >> worried that I am not doing something right before I submit a bug >> report. >> >> All best, >> Tench >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Hi. I made some wishes on the wishlist regarding the inplace-edit. But I need your opinion in a matter. I would like other types of input fields to be supported(password, select etc.), but before integrating I wanna make sure it is usable for others. Have you any idea of how to make a flexible integration of other fieldtypes? Personally I am thinking about making some kind of plugable "interface" between inplaceedit-lib and the field, making it possible to always integrate a new kind of field, but it might be overkill! :-) Best Regards Michael Krog
Would you please tell me where I can see the documentation for this? I couldn''t find it on rails api and no luck on script.aculo.us either. Thanks On 10/2/05, Tench <psychomachine@mac.com> wrote:> I can''t host the example at the moment, but it''s really simple, so I > will explain it as best as I can: > > My code looks like this: > > <p>a <a id="32" class="edit">simple</a> <a id="33" > class=''edit''>paragraph</a></p> > > I am using behavior.js like this: > > ''.edit'' : function (element) { > element.onclick = function() { > new Ajax.InPlaceEditor(element.id, ''/textedit.php'', {}); > } > }, > > So, when I click on editable word for the first time, everything''s > dandy. The form gets submitted and the new value displayed. But, if > I click again on the same word (which was just edited), I get two > input forms instead of one -- which looks like the attached image. > > > > > If click OK on both forms, and try to click on the editable word > again -- I will get three input forms etc. > > The same behavior occurs on Firefox. Now, Safari doesn''t produce any > error messages with duplicate forms, but Firefox does: > > Error: [Exception... "''Permission denied to get property > XULElement.selectedIndex'' when calling method: > [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e > (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http:// > test.dev/js/prototype.js :: anonymous :: line 850" data: no] > Source File: http://test.dev/js/prototype.js > Line: 850 > > I hope this helps. > > All best, > Tench > > On 02. ??? 2005., at 10:14, Jon Tirsen wrote: > > > I don''t think I''m getting this. Could you provide some more details? > > Maybe create a minimal HTML document that reproduces the problem? Are > > there any JavaScript errors? > > > > Cheers, > > Jon > > > > On 10/2/05, Tench <psychomachine@mac.com> wrote: > > > >> Hi, > >> > >> I''ve downloaded the latest svn trunk and was glad to see that > >> Ajax.InPlaceEditor forms can now be correctly submitted on Safari as > >> well, with the server response being correctly displayed as well. > >> > >> The problem is, however, that clicking again on the same element > >> (after sumbitting it first) will duplicate the submit form. The next > >> attempt will triplicate it etc, etc... > >> > >> Could somebody on a Mac please confirm this behavior? I''m always > >> worried that I am not doing something right before I submit a bug > >> report. > >> > >> All best, > >> Tench > >> _______________________________________________ > >> Rails-spinoffs mailing list > >> Rails-spinoffs@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >> > >> > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > >
The problem is because you''re using behavior.js. behavior.js is a great idea but most controls script.aculo.us don''t support it. The correct way to use it is described on this page: http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor Simply just instantiate the control when you load the page. The control will itself take care of it''s lifecycle and doesn''t need to rely on behavior.js. Let me know if this doesn''t help. Cheers, Jon On 10/2/05, Tench <psychomachine@mac.com> wrote:> I can''t host the example at the moment, but it''s really simple, so I > will explain it as best as I can: > > My code looks like this: > > <p>a <a id="32" class="edit">simple</a> <a id="33" > class=''edit''>paragraph</a></p> > > I am using behavior.js like this: > > ''.edit'' : function (element) { > element.onclick = function() { > new Ajax.InPlaceEditor(element.id, ''/textedit.php'', {}); > } > }, > > So, when I click on editable word for the first time, everything''s > dandy. The form gets submitted and the new value displayed. But, if > I click again on the same word (which was just edited), I get two > input forms instead of one -- which looks like the attached image. > > > > > If click OK on both forms, and try to click on the editable word > again -- I will get three input forms etc. > > The same behavior occurs on Firefox. Now, Safari doesn''t produce any > error messages with duplicate forms, but Firefox does: > > Error: [Exception... "''Permission denied to get property > XULElement.selectedIndex'' when calling method: > [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e > (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http:// > test.dev/js/prototype.js :: anonymous :: line 850" data: no] > Source File: http://test.dev/js/prototype.js > Line: 850 > > I hope this helps. > > All best, > Tench > > On 02. ??? 2005., at 10:14, Jon Tirsen wrote: > > > I don''t think I''m getting this. Could you provide some more details? > > Maybe create a minimal HTML document that reproduces the problem? Are > > there any JavaScript errors? > > > > Cheers, > > Jon > > > > On 10/2/05, Tench <psychomachine@mac.com> wrote: > > > >> Hi, > >> > >> I''ve downloaded the latest svn trunk and was glad to see that > >> Ajax.InPlaceEditor forms can now be correctly submitted on Safari as > >> well, with the server response being correctly displayed as well. > >> > >> The problem is, however, that clicking again on the same element > >> (after sumbitting it first) will duplicate the submit form. The next > >> attempt will triplicate it etc, etc... > >> > >> Could somebody on a Mac please confirm this behavior? I''m always > >> worried that I am not doing something right before I submit a bug > >> report. > >> > >> All best, > >> Tench > >> _______________________________________________ > >> Rails-spinoffs mailing list > >> Rails-spinoffs@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >> > >> > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > >
Dear Jon, sorry it took me a while to respond to your email. Yes, you were right -- the problem was that I was using behavior.js. If I put the new Ajax.InPlaceEditor in the html page, it works. And although I think it''s a shame that InPlaceEditor doesn''t work with behavior though -- I''m using behavior with autocompleter without any problems -- I can get by without it. Thank you very much for the clarification. Tench On 04. ??? 2005., at 14:15, Jon Tirsen wrote:> The problem is because you''re using behavior.js. behavior.js is a > great idea but most controls script.aculo.us don''t support it. > > The correct way to use it is described on this page: > http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor > > Simply just instantiate the control when you load the page. The > control will itself take care of it''s lifecycle and doesn''t need to > rely on behavior.js. > > Let me know if this doesn''t help. > > Cheers, > Jon > > On 10/2/05, Tench <psychomachine@mac.com> wrote: > >> I can''t host the example at the moment, but it''s really simple, so I >> will explain it as best as I can: >> >> My code looks like this: >> >> <p>a <a id="32" class="edit">simple</a> <a id="33" >> class=''edit''>paragraph</a></p> >> >> I am using behavior.js like this: >> >> ''.edit'' : function (element) { >> element.onclick = function() { >> new Ajax.InPlaceEditor(element.id, ''/textedit.php'', {}); >> } >> }, >> >> So, when I click on editable word for the first time, everything''s >> dandy. The form gets submitted and the new value displayed. But, if >> I click again on the same word (which was just edited), I get two >> input forms instead of one -- which looks like the attached image. >> >> >> >> >> If click OK on both forms, and try to click on the editable word >> again -- I will get three input forms etc. >> >> The same behavior occurs on Firefox. Now, Safari doesn''t produce any >> error messages with duplicate forms, but Firefox does: >> >> Error: [Exception... "''Permission denied to get property >> XULElement.selectedIndex'' when calling method: >> [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e >> (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http:// >> test.dev/js/prototype.js :: anonymous :: line 850" data: no] >> Source File: http://test.dev/js/prototype.js >> Line: 850 >> >> I hope this helps. >> >> All best, >> Tench >> >> On 02. ??? 2005., at 10:14, Jon Tirsen wrote: >> >> >>> I don''t think I''m getting this. Could you provide some more details? >>> Maybe create a minimal HTML document that reproduces the problem? >>> Are >>> there any JavaScript errors? >>> >>> Cheers, >>> Jon >>> >>> On 10/2/05, Tench <psychomachine@mac.com> wrote: >>> >>> >>>> Hi, >>>> >>>> I''ve downloaded the latest svn trunk and was glad to see that >>>> Ajax.InPlaceEditor forms can now be correctly submitted on >>>> Safari as >>>> well, with the server response being correctly displayed as well. >>>> >>>> The problem is, however, that clicking again on the same element >>>> (after sumbitting it first) will duplicate the submit form. The >>>> next >>>> attempt will triplicate it etc, etc... >>>> >>>> Could somebody on a Mac please confirm this behavior? I''m always >>>> worried that I am not doing something right before I submit a bug >>>> report. >>>> >>>> All best, >>>> Tench >>>> _______________________________________________ >>>> Rails-spinoffs mailing list >>>> Rails-spinoffs@lists.rubyonrails.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>> >>>> >>>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs@lists.rubyonrails.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>> >> >> >> >> >> >
Maybe Matching Threads
- why is the result of expr. Ajax.InPlaceEditor not an object in Safari
- cross-fade effect on elements updated by ajax.updater?
- safari vs. firefox on mac os x: flickering combination effects
- InPlaceEditor on an empty div
- autocomplete: how to access a child element of <li>