[Proto-Scripty] Need help sending information from multiple forms
Hello. I need a little help. I'm developing an application using prototype php and I want to do the following: In a page I have 3 forms: One containing a start calendar, one containing a end calendar and one that allows the user to select witch data to show on a graph. The idea is to allow the user to use the two calendars to select a start and end date and the third form to select the data rows to show on a graph. When the user changes the month or year on either calendar, the calendar reloads and shows the selected month/year (hence the need for one form for each calendar). After the user sets the start and end dates and chooses what to plot, he will click the submit button. What's supposed to happen is for a js function to post all information from the 3 forms to a php file and show the result. I'm using this to post: var destiny; function ajaxLoad(url, formID, dest){ destiny = dest; var MyAjax = new Ajax.Request(url, { method: 'post', parameters: $(formID).serialize(true), onComplete: showResponse }); } function showResponse(position){ $(destiny).innerHTML = position.responseText; } Seeing it's not possible to use nested forms, I need to combine the information of all 3 and send it as parameters. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Need help sending information from multiple forms
Thank you for your help. It's working as expected :-) On Nov 15, 3:32 am, kangax [EMAIL PROTECTED] wrote: On Nov 14, 11:52 am, Abel Figueiredo [EMAIL PROTECTED] wrote: This solution. Is it for same-named form controls? My solution doesn't have same-named controls. So with this i can send the return from mergeForms... as my parameters, right? Yes. Just pass it as many forms as you need. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Need help sending information from multiple forms
I spoke too soon. There's a little problem. One of the forms contains a select option. When I click a button the merge function is called and the value shown should be the selected one, but it's the first one instead. At first I thought it could be something else and I've submitted that particular form with $(form).serialize . On 18 Nov, 09:58, Abel Figueiredo [EMAIL PROTECTED] wrote: Thank you for your help. It's working as expected :-) On Nov 15, 3:32 am, kangax [EMAIL PROTECTED] wrote: On Nov 14, 11:52 am, Abel Figueiredo [EMAIL PROTECTED] wrote: This solution. Is it for same-named form controls? My solution doesn't have same-named controls. So with this i can send the return from mergeForms... as my parameters, right? Yes. Just pass it as many forms as you need. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Take action after Ajax.Updater
Hi all. I've got two selects and an image. When I change the second one, the image updates and when i change the first one, the second is updated. The information contained in the second select is vital to choose witch image is loaded. My problem is when I change the first one, I want to trigger the image change only after the second select is altered. I've tried to use 'onSuccess' on the Ajax.Updater of the first select, I've tried to place a setTimeout on it, but it's not a good solution. It works sometimes, but there are times when the reloadImg function is triggered before updating the second select. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---