try this: 

function showResponse(req) {
$(currentTarget).InnerHTML = req.responseText;
}


-----Original Message-----
Date: Sunday, June 21, 2009 7:35:31 am
To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
From: "Robaj" <robrass...@gmail.com>
Subject: [Proto-Scripty] Being Dynamic


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 sendReq


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