Hello, for some reason the code below is not sending the values to the test.php file. Any ideas please? Cheers Geoff <script src="assets/javascripts/prototype.js" type="text/javascript"></ script> <script src="assets/javascripts/scriptaculous.js" type="text/ javascript"></script> <script type="text/javascript"> function send(){ var params = Form.serialize($(''dataform'')); new Ajax.Updater(''updateDiv'', ''test.php'', {asynchronous:true,method:''get'', parameters:params}); } </script> </head> <body> <form id="dataform"> <table width="100%"> <tr> <td> <a href="assets/audio/sound.mid"> Chord 1</a> <input type="text" size="1" id="chord1"> </td> <td> Chord 2 <input type="text" size="1" id="chord2"> </td> <tr> <td><input type="button" onclick="send()" value="Send your figures" /></td></tr> </table> </form> <div id="updateDiv"></div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 1 feb, 13:34, geoffcox <geoffa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > for some reason the code below is not sending the values to the > test.php file. Any ideas please? > > Cheers > > Geoff > > <script src="assets/javascripts/prototype.js" type="text/javascript"></ > script> > <script src="assets/javascripts/scriptaculous.js" type="text/ > javascript"></script> > > <script type="text/javascript"> > > function send(){ > var params = Form.serialize($(''dataform'')); > new Ajax.Updater(''updateDiv'', ''test.php'', > {asynchronous:true,method:''get'', parameters:params}); > > } > > </script> > > </head> > <body> > > <form id="dataform"> > <table width="100%"> > <tr> > <td> > <a href="assets/audio/sound.mid"> > Chord 1</a> <input type="text" size="1" id="chord1"> > </td> > <td> > Chord 2 <input type="text" size="1" id="chord2"> > </td> > <tr> > <td><input type="button" onclick="send()" value="Send your figures" /></td> > > </tr> > </table> > </form> > > <div id="updateDiv"></div> > > </body> > </html>All your form elements are required to have a name-attribute.. without those the form can''t be properly serialized. Greetz, Wizz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> All your form elements are required to have a name-attribute.. without > those the form can''t be properly serialized. > > Greetz, > > WizzThanks for that Wizz - I think when I was just using ajax (minus prototype) id was OK! Cheers Geoff --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---