A question: how do you output your response from your php file? via echo or return?
A suggestion: take your function call and your data string out of your function. On Nov 21, 7:56 am, danielnickless <[EMAIL PROTECTED]> wrote: > Sorry, > > This thread... > > http://groups.google.com/group/mootools-users/browse_thread/thread/7a... > > On Nov 21, 2:49 pm, danielnickless <[EMAIL PROTECTED]> > wrote: > > > Hiya, > > > I'm having a little bit of trouble understanding this - hope you can > > help! > > > I can't seem to write a function which takes arguments, turns these > > into a mootools request and then returns the response from the server > > side script. > > > So far i have... > > > function text_to_db(text,table,field,id){ > > > var text_to_db = new Request({method: 'get', url: > > "../assets/ > > controllers/text_to_db.php" > > > > , onSuccess: function(response){ > > > > makeChanges(response) > > > > } > > > > }) > > > var string = > > "text="+text+"&table="+table+"&field="+field+"&id="+id; > > > text_to_db.send(string); > > > function makeChanges(response){return response}; > > > } > > > But it always returns undefined. > > > I think it has something to do with this thread but i've spent a good > > few hours trying to work it out and i'm stumped. > > > Hope you can help, > > > Dan
