Hello, I have a problem with Ajax.Updater and Mozilla as well as IE. I am trying to have a PHP script get some input from a form processing it and returning the result to the webpage by adding a new row into a table. The HTML-file looks more or less like this (I am not posting the whole code because it is not necessary to understand the problem): <html><head> <script reference to prototype> <script to perform the Ajax.Updater routine> </head><body> <table> <tr><td>data set already in table</td></tr> <tr><td>another dataset already in table</td></tr> <tr><td><div id=ajax_result_div></div></td></tr> <form><tr><td>the form to submit the data to the php script</td></tr></ form> </table> Now the problem is: Mozilla does not send any variable of the form to the PHP script while IE does without a problem. After several hours of research I found out that Mozilla doesn''t like to have <form>-tags within a table. If I change the above code to: <html><head> <script reference to prototype> <script to perform the Ajax.Updater routine> </head><body> <form> <table> <tr><td>data set already in table</td></tr> <tr><td>another dataset already in table</td></tr> <tr><td><div id=ajax_result_div></div></td></tr> <tr><td>the form to submit the data to the php script</td></tr> </table> </form> Mozilla sends the variables correctly. Anyway this is no option to me because I need to have several forms within one table. Does anybody know a solution or why Mozilla is doing this? It does not happen if I use a form without javascript, the variables are submitted normally then. I also have a second problem. I would like the result returned from the php script to be added as new row to a table. The php script returns the result like this: <tr><td>dataset variable 1</td><td>dataset variable 2</td><td>etc.</ td></tr> Now to have this added to the table I tried different possibilities for the result <div>: This worked for Mozilla but not for IE (IE did not show anything): <tr id=ajax_result_div></tr> This try showed the result but outside the table: <div id=ajax_result_div></div> This try showed the result but everything in one col instead of several: <tr><td id=ajax_result_div></td></tr> Any help will be appreciated. Thanks in advance. Ben. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Try re-making your page so it will pass the W3C validator. That''s always a good first step anyway. You may put as many unique forms in a page as you like, but you can''t interleave a form tag within the structure of a table as you have done. Put the entire form and all of its contents within the bounds of a single TD, and you are fine. Walter On Oct 20, 2007, at 6:14 PM, coruscant wrote:> > Hello, > > I have a problem with Ajax.Updater and Mozilla as well as IE. I am > trying to have a PHP script get some input from a form processing it > and returning the result to the webpage by adding a new row into a > table. > > The HTML-file looks more or less like this (I am not posting the whole > code because it is not necessary to understand the problem): > > <html><head> > <script reference to prototype> > <script to perform the Ajax.Updater routine> > </head><body> > > <table> > <tr><td>data set already in table</td></tr> > <tr><td>another dataset already in table</td></tr> > <tr><td><div id=ajax_result_div></div></td></tr> > <form><tr><td>the form to submit the data to the php script</td></ > tr></ > form> > </table> > > Now the problem is: Mozilla does not send any variable of the form to > the PHP script while IE does without a problem. After several hours of > research I found out that Mozilla doesn''t like to have <form>-tags > within a table. If I change the above code to: > > <html><head> > <script reference to prototype> > <script to perform the Ajax.Updater routine> > </head><body> > > <form> > <table> > <tr><td>data set already in table</td></tr> > <tr><td>another dataset already in table</td></tr> > <tr><td><div id=ajax_result_div></div></td></tr> > <tr><td>the form to submit the data to the php script</td></tr> > </table> > </form> > > Mozilla sends the variables correctly. Anyway this is no option to me > because I need to have several forms within one table. Does anybody > know a solution or why Mozilla is doing this? It does not happen if I > use a form without javascript, the variables are submitted normally > then. > > I also have a second problem. I would like the result returned from > the php script to be added as new row to a table. The php script > returns the result like this: > > <tr><td>dataset variable 1</td><td>dataset variable 2</td><td>etc.</ > td></tr> > > Now to have this added to the table I tried different possibilities > for the result <div>: > > This worked for Mozilla but not for IE (IE did not show anything): > <tr id=ajax_result_div></tr> > > This try showed the result but outside the table: > <div id=ajax_result_div></div> > > This try showed the result but everything in one col instead of > several: > <tr><td id=ajax_result_div></td></tr> > > Any help will be appreciated. Thanks in advance. > > Ben. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
A Form _can_ contain a table <div> <form ...> <table> <tr> <td> <input type="text" ... /> </td> </tr> <tr> <td> <input type="submit" /> </td> </tr> </table> </form> </div> for example. On 22/10/2007, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> > Try re-making your page so it will pass the W3C validator. That''s > always a good first step anyway. You may put as many unique forms in > a page as you like, but you can''t interleave a form tag within the > structure of a table as you have done. Put the entire form and all of > its contents within the bounds of a single TD, and you are fine. > > Walter > > On Oct 20, 2007, at 6:14 PM, coruscant wrote: > > > > > Hello, > > > > I have a problem with Ajax.Updater and Mozilla as well as IE. I am > > trying to have a PHP script get some input from a form processing it > > and returning the result to the webpage by adding a new row into a > > table. > > > > The HTML-file looks more or less like this (I am not posting the whole > > code because it is not necessary to understand the problem): > > > > <html><head> > > <script reference to prototype> > > <script to perform the Ajax.Updater routine> > > </head><body> > > > > <table> > > <tr><td>data set already in table</td></tr> > > <tr><td>another dataset already in table</td></tr> > > <tr><td><div id=ajax_result_div></div></td></tr> > > <form><tr><td>the form to submit the data to the php script</td></ > > tr></ > > form> > > </table> > > > > Now the problem is: Mozilla does not send any variable of the form to > > the PHP script while IE does without a problem. After several hours of > > research I found out that Mozilla doesn''t like to have <form>-tags > > within a table. If I change the above code to: > > > > <html><head> > > <script reference to prototype> > > <script to perform the Ajax.Updater routine> > > </head><body> > > > > <form> > > <table> > > <tr><td>data set already in table</td></tr> > > <tr><td>another dataset already in table</td></tr> > > <tr><td><div id=ajax_result_div></div></td></tr> > > <tr><td>the form to submit the data to the php script</td></tr> > > </table> > > </form> > > > > Mozilla sends the variables correctly. Anyway this is no option to me > > because I need to have several forms within one table. Does anybody > > know a solution or why Mozilla is doing this? It does not happen if I > > use a form without javascript, the variables are submitted normally > > then. > > > > I also have a second problem. I would like the result returned from > > the php script to be added as new row to a table. The php script > > returns the result like this: > > > > <tr><td>dataset variable 1</td><td>dataset variable 2</td><td>etc.</ > > td></tr> > > > > Now to have this added to the table I tried different possibilities > > for the result <div>: > > > > This worked for Mozilla but not for IE (IE did not show anything): > > <tr id=ajax_result_div></tr> > > > > This try showed the result but outside the table: > > <div id=ajax_result_div></div> > > > > This try showed the result but everything in one col instead of > > several: > > <tr><td id=ajax_result_div></td></tr> > > > > Any help will be appreciated. Thanks in advance. > > > > Ben. > > > > > > > > > > > >-- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Oh, yes, I understand that completely. But what was shown looked to me like the following: <table> <tr><td>...</td></tr> <form ...> <tr><td>form stuff here</td></tr> </form> </table> Intermingled, see? It looked as though there were bits of the form sprinkled in between table rows. You can''t do that. At least not with any predictable results. You can do either of the following: <form> <table> <tr><td>form stuff here</td></tr> </table> </form> or <table> <tr><td><form>form stuff here</form></td></tr> </table> Under no circumstances can you have anything (besides child tags of tr) in between <tr> tags. The possible (legal) child tags of tr are td and th, inclusive, as far as I know. Walter On Oct 22, 2007, at 10:00 AM, Richard Quadling wrote:> > A Form _can_ contain a table > > <div> > <form ...> > <table> > <tr> > <td> > <input type="text" ... /> > </td> > </tr> > <tr> > <td> > <input type="submit" /> > </td> > </tr> > </table> > </form> > </div> > > for example. > > On 22/10/2007, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: >> >> Try re-making your page so it will pass the W3C validator. That''s >> always a good first step anyway. You may put as many unique forms in >> a page as you like, but you can''t interleave a form tag within the >> structure of a table as you have done. Put the entire form and all of >> its contents within the bounds of a single TD, and you are fine. >> >> Walter >> >> On Oct 20, 2007, at 6:14 PM, coruscant wrote: >> >>> >>> Hello, >>> >>> I have a problem with Ajax.Updater and Mozilla as well as IE. I am >>> trying to have a PHP script get some input from a form processing it >>> and returning the result to the webpage by adding a new row into a >>> table. >>> >>> The HTML-file looks more or less like this (I am not posting the >>> whole >>> code because it is not necessary to understand the problem): >>> >>> <html><head> >>> <script reference to prototype> >>> <script to perform the Ajax.Updater routine> >>> </head><body> >>> >>> <table> >>> <tr><td>data set already in table</td></tr> >>> <tr><td>another dataset already in table</td></tr> >>> <tr><td><div id=ajax_result_div></div></td></tr> >>> <form><tr><td>the form to submit the data to the php script</td></ >>> tr></ >>> form> >>> </table> >>> >>> Now the problem is: Mozilla does not send any variable of the >>> form to >>> the PHP script while IE does without a problem. After several >>> hours of >>> research I found out that Mozilla doesn''t like to have <form>-tags >>> within a table. If I change the above code to: >>> >>> <html><head> >>> <script reference to prototype> >>> <script to perform the Ajax.Updater routine> >>> </head><body> >>> >>> <form> >>> <table> >>> <tr><td>data set already in table</td></tr> >>> <tr><td>another dataset already in table</td></tr> >>> <tr><td><div id=ajax_result_div></div></td></tr> >>> <tr><td>the form to submit the data to the php script</td></tr> >>> </table> >>> </form> >>> >>> Mozilla sends the variables correctly. Anyway this is no option >>> to me >>> because I need to have several forms within one table. Does anybody >>> know a solution or why Mozilla is doing this? It does not happen >>> if I >>> use a form without javascript, the variables are submitted normally >>> then. >>> >>> I also have a second problem. I would like the result returned from >>> the php script to be added as new row to a table. The php script >>> returns the result like this: >>> >>> <tr><td>dataset variable 1</td><td>dataset variable 2</td><td>etc.</ >>> td></tr> >>> >>> Now to have this added to the table I tried different possibilities >>> for the result <div>: >>> >>> This worked for Mozilla but not for IE (IE did not show anything): >>> <tr id=ajax_result_div></tr> >>> >>> This try showed the result but outside the table: >>> <div id=ajax_result_div></div> >>> >>> This try showed the result but everything in one col instead of >>> several: >>> <tr><td id=ajax_result_div></td></tr> >>> >>> Any help will be appreciated. Thanks in advance. >>> >>> Ben. >>> >>> >>>> >> >> >>> >> > > > -- > ----- > Richard Quadling > Zend Certified Engineer : http://zend.com/zce.php? > c=ZEND002498&r=213474731 > "Standing on the shoulders of some very clever giants!" > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello, o.k. thanks for your answers. This means there is no possibility to have a seperat form in each row of a table with keeping the cols over the whole table? What I would actually need is: <table> <tr><td><input1></td><td><input2></td><td><input3></ td><td>submitbutton</td></tr> <tr><td><input1></td><td><input2></td><td><input3></ td><td>submitbutton</td></tr> </table> While each row should be a seperat form but the cols should go over all forms. If I use your solution: <table> <tr><td><form><table><tr><td><input1></td><td><input2></ td><td><input3></td><td>submitbutton</td></tr></table></form></td></ tr> <tr><td><form><table><tr><td><input1></td><td><input2></ td><td><input3></td><td>submitbutton</td></tr></table></form></td></ tr> </table> This wouldn''t keep the cols the same. Is there a reason why W3C did not allow to have other tags between table rows? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
you should be able to get all the columns to line up if you use the right combination of border-collapse, margin and padding. On 10/28/07, coruscant <carda-q7UtVs2j7f0sV2N9l4h3zg@public.gmane.org> wrote:> > > Hello, > > o.k. thanks for your answers. This means there is no possibility to > have a seperat form in each row of a table with keeping the cols over > the whole table? > > What I would actually need is: > > <table> > <tr><td><input1></td><td><input2></td><td><input3></ > td><td>submitbutton</td></tr> > <tr><td><input1></td><td><input2></td><td><input3></ > td><td>submitbutton</td></tr> > </table> > > While each row should be a seperat form but the cols should go over > all forms. If I use your solution: > > <table> > <tr><td><form><table><tr><td><input1></td><td><input2></ > td><td><input3></td><td>submitbutton</td></tr></table></form></td></ > tr> > <tr><td><form><table><tr><td><input1></td><td><input2></ > td><td><input3></td><td>submitbutton</td></tr></table></form></td></ > tr> > </table> > > This wouldn''t keep the cols the same. Is there a reason why W3C did > not allow to have other tags between table rows? > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ask yourself why you need separate forms. Maybe you can do something clever in your controller to figure out *which* submit button was pressed. That''s what I would do. One form, wrapping the entire page. Many input elements, many submit buttons (or the local analogue), each uniquely named. form table row / text input / select picker / submit button 1 row / text input / select picker / submit button 2 row / text input / select picker / submit button 3 row / text input / select picker / submit button 4 row / text input / select picker / submit button 5 row / text input / select picker / submit button 6 /table /form Walter On Oct 28, 2007, at 12:07 PM, coruscant wrote:> > Hello, > > o.k. thanks for your answers. This means there is no possibility to > have a seperat form in each row of a table with keeping the cols over > the whole table? > > What I would actually need is: > > <table> > <tr><td><input1></td><td><input2></td><td><input3></ > td><td>submitbutton</td></tr> > <tr><td><input1></td><td><input2></td><td><input3></ > td><td>submitbutton</td></tr> > </table> > > While each row should be a seperat form but the cols should go over > all forms. If I use your solution: > > <table> > <tr><td><form><table><tr><td><input1></td><td><input2></ > td><td><input3></td><td>submitbutton</td></tr></table></form></td></ > tr> > <tr><td><form><table><tr><td><input1></td><td><input2></ > td><td><input3></td><td>submitbutton</td></tr></table></form></td></ > tr> > </table> > > This wouldn''t keep the cols the same. Is there a reason why W3C did > not allow to have other tags between table rows? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---