Add the variable to the data declaration of the jquery.ajax method. This will be passed along as a POST or GET and then your function just looks at request.vars.naotext.
-- Thadeus On Tue, Jun 1, 2010 at 10:30 AM, pk <[email protected]> wrote: > hi i need help, > > how can i call a function from jquery with parameters for example: > > $('nao_speak').click(function(event){ > event.preventDefault(); > var naotext = $('naospeak').val(); > > $.ajax({ url: "{{=URL(r=request,c='speak',f='NaoSpeak')}}", > naotext}); > console.log('Nao is speaking'); > }); > > i want to call the function NaoSpeak and the variable naotext should > be given to this function. > how can i solve this problem? > > thanks. > peter >

