Hello, I love Prototype.js, it's sort of the miracle we have been
waiting for.

All hard coded examples I have tried work great, but for some reason
when I try to get dynamic (one sendRequest() for a group of controls
for example) I can not get something that works.

Maybe I am not allowed to do this, feel free to tell me I'm a plonker.

Something in these lines -
                       var currentTarget;

                        function sendRequest( controlID, controlData, target ) {
                               currentTarget = target;
                                new Ajax.Request("requests.php",
                                        {
                                        method: 'post',
                                        postBody: controlID+'='+ 
$F(controlData),
                                            onComplete: showResponse
                                        });
                                }
                       function showResponse() {
                            $(currentTarget).innerHTML=
req.responseText;
                       }

I have narrowed it down trying to find what it doesn't like, then when
I get to the plain old static -

                        function sendRequest() {
                                new Ajax.Request("requests.php",
                                        {
                                        method: 'post',
                                        postBody: 'name='+ $F('name'),
                                            onComplete: showResponse
                                        });
                                }

It all works again. Do I really have to have a 'sendRequest()' for
each control? I know that I don't, so why can't I get going with this?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to