a stembridge
2008-Jun-19 21:32 UTC
PeriodicalUpdater bug when returning HTML with <form> tag
Hi, I''m using PeriodicalUpdater to display a short HTML form in simple web page. <script type=''text/javascript'' language=''JavaScript''> new Ajax.PeriodicalUpdater(''div_id'', ''data.php'', { method: ''post'', frequency: 5, decay: 1, parameters: {id: 123, foo: ''bar''} }); </script> <div id=''div_id''></div> The server file data.php returns the following HTML: echo "<form method=''post'' action=''submit_data.php''> <input type=''hidden'' name=''foo'' value=''RAB''> <input type=''submit'' name=''sub'' value=''Submit Me!''> </form>"; So - when I access the page with PeriodicalUpdater, the form is not displayed. No javascript errors, no php errors - nothing. If I change the <form></form> tags to <foo_form></foo_form>, the form displays in the div_id block as it should. Is there a reason I can''t return HTML with <form> tags? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
T.J. Crowder
2008-Jun-20 06:36 UTC
Re: PeriodicalUpdater bug when returning HTML with <form> tag
Hi, No reason that I can see, no. Your example works fine for me on IE6, FF3, Safari 3.1, and Opera 9, all on Windows XP. This suggests there''s something "special" about the surroundings around div_id in your page. Try creating a complete pared-down example page. If you don''t find the problem just in the process of doing that (you probably will), you can post it on http://pastie.org and link to it from this thread, and someone will probably see what''s going on. Also let us know what your environment is (browser, OS)... Good luck, -- T.J. Crowder tj / crowder software / com On Jun 19, 10:32 pm, a stembridge <adrya.stembri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m using PeriodicalUpdater to display a short HTML form in simple web > page. > > <script type=''text/javascript'' language=''JavaScript''> > new Ajax.PeriodicalUpdater(''div_id'', ''data.php'', > { > method: ''post'', > frequency: 5, > decay: 1, > parameters: {id: 123, foo: ''bar''} > }); > </script> > > <div id=''div_id''></div> > > The server file data.php returns the following HTML: > > echo "<form method=''post'' action=''submit_data.php''> > <input type=''hidden'' name=''foo'' value=''RAB''> > <input type=''submit'' name=''sub'' value=''Submit Me!''> > </form>"; > > So - when I access the page with PeriodicalUpdater, the form is not > displayed. No javascript errors, no php errors - nothing. > > If I change the <form></form> tags to <foo_form></foo_form>, the form > displays in the div_id block as it should. > > Is there a reason I can''t return HTML with <form> tags?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Foster
2008-Jun-20 20:13 UTC
Re: PeriodicalUpdater bug when returning HTML with <form> tag
Watch your HTML, those input objects are malformed, don''t forget the closing tags on simple <nodes/> -- Matt Foster Ajax Engineer Nth Penguin, LLC http://www.nthpenguin.com On Jun 20, 2:36 am, "T.J. Crowder" <t...-MUGVhKWuB3Yd9SLi6J12IkEOCMrvLtNR@public.gmane.org> wrote:> Hi, > > No reason that I can see, no. Your example works fine for me on IE6, > FF3, Safari 3.1, and Opera 9, all on Windows XP. This suggests > there''s something "special" about the surroundings around div_id in > your page. > > Try creating a complete pared-down example page. If you don''t find > the problem just in the process of doing that (you probably will), you > can post it onhttp://pastie.organd link to it from this thread, and > someone will probably see what''s going on. Also let us know what your > environment is (browser, OS)... > > Good luck, > -- > T.J. Crowder > tj / crowder software / com > > On Jun 19, 10:32 pm, a stembridge <adrya.stembri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > I''m using PeriodicalUpdater to display a short HTML form in simple web > > page. > > > <script type=''text/javascript'' language=''JavaScript''> > > new Ajax.PeriodicalUpdater(''div_id'', ''data.php'', > > { > > method: ''post'', > > frequency: 5, > > decay: 1, > > parameters: {id: 123, foo: ''bar''} > > }); > > </script> > > > <div id=''div_id''></div> > > > The server file data.php returns the following HTML: > > > echo "<form method=''post'' action=''submit_data.php''> > > <input type=''hidden'' name=''foo'' value=''RAB''> > > <input type=''submit'' name=''sub'' value=''Submit Me!''> > > </form>"; > > > So - when I access the page with PeriodicalUpdater, the form is not > > displayed. No javascript errors, no php errors - nothing. > > > If I change the <form></form> tags to <foo_form></foo_form>, the form > > displays in the div_id block as it should. > > > Is there a reason I can''t return HTML with <form> tags?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---