Hi guys, I''m working on a web site and I have to make possible for users to post comments about the photos from the photo gallery. I need just 2 things: name and comment. I''ve seen a nice HTML site with such a thing, and looking for the used tehnique I discovered prototype.js. As JS is something new for me, I didn''t understand much about it, even after reading the prototype.js documentation. I also searched the net for some tutorials, sample applications but I didn''t found anything to help me in this. I suppose it''s something very basic thing, since the found sample applications were so complex ones. Can someone explain me what do I need to do? And especially, how? Do I need for what I have to do, SQL database, some PHP, or just simple HTML with prototype.js . Any help is welcome and verrrrrrrrrrrrrrrry appreciated. Thanks, Attila --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I hope you aren''t on any time crunches because what you want to do is not simple, not really. You need to post the form information to a php or cgi page which will then do data validation and strip out anything that might be harmful to the database or the system. You then need to store the information into the database and finally return the user to the page they posted from. Those of us who do it day in and day out can do it in our sleep, so we often forget that actually doing it for the first time is rather difficult and can be complicated. I would suggest forgetting the prototype part for now and concentrate on getting the form posted normally, saved to the database safely and displayed safely before trying to get fancy AJAX integration going on. but thats just my two cents On Sun, Jan 27, 2008 at 1:04 PM, atisz <attila.szekely-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi guys, > > > I''m working on a web site and I have to make possible for users to > post comments about the photos from the photo gallery. I need just 2 > things: name and comment. I''ve seen a nice HTML site with such a > thing, and looking for the used tehnique I discovered prototype.js. As > JS is something new for me, I didn''t understand much about it, even > after reading the prototype.js documentation. I also searched the net > for some tutorials, sample applications but I didn''t found anything to > help me in this. > I suppose it''s something very basic thing, since the found sample > applications were so complex ones. > Can someone explain me what do I need to do? And especially, how? Do I > need for what I have to do, SQL database, some PHP, or just simple > HTML with prototype.js . > Any help is welcome and verrrrrrrrrrrrrrrry appreciated. > > Thanks, Attila > > >--~--~---------~--~----~------------~-------~--~----~ 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 Jan 28, 4:13 am, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I hope you aren''t on any time crunches because what you want to do is not > simple, not really. > > You need to post the form information to a php or cgi page which will then > do data validation and strip out anything that might be harmful to the > database or the system. You then need to store the information into the > database and finally return the user to the page they posted from. > > Those of us who do it day in and day out can do it in our sleep, so we often > forget that actually doing it for the first time is rather difficult and can > be complicated. > > I would suggest forgetting the prototype part for now and concentrate on > getting the form posted normally, saved to the database safely and displayed > safely before trying to get fancy AJAX integration going on.I''ll second that. Once you have it working as a standard form, and have all the back-end sorted, you can add the AJAX stuff. That way you can program the dynamic part knowing that at any point you can revert to the default behaviour and it will still work. -- Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ok, guys So as I understand it''s not as simple as I thought. I don''t know what I''m going to do about it, I was expecting for something like this: http://www.ibm.com/developerworks/library/x-ajaxxml5/index.html#fig1 , but only to meet my requirements. Maybe I''ll give up, because the time is quite pressing me. :( Thanks for your advices, and if someone can help me, any tutorials are still welcomed. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
HI there, That tutorial uses AJAX to submit the form which is another layer of complexity to a commenting system which allows the user to submit a comment and update the page with the new comment without re-loading the page. A basic comments system doesn''t require this and most use just a database and a php script. When the user has written their comment and click the submit button the comment is sent to the php script. The script will validate the data( make it safe to insert in to a database) and then run a query to insert it...another part of the script will go through and select all the comments and output them on the page This is not hard if you have some experience of php/mysql.....if you dont then perhaps a days reading could give you the info you need to achieve this ...there is a wealth of info at the end of a google search.....this really is the bread and butter of web development so it wouold be a good idea to learn :) On Jan 28, 8:40 am, atisz <attila.szek...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok, guys > > So as I understand it''s not as simple as I thought. I don''t know what > I''m going to do about it, I was expecting for something like this:http://www.ibm.com/developerworks/library/x-ajaxxml5/index.html#fig1, > but only to meet my requirements. Maybe I''ll give up, because the time > is quite pressing me. :( > Thanks for your advices, and if someone can help me, any tutorials are > still welcomed.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---