Inside the listener for "multiPipeCreate", save a reference to pipe. Then,
in your textButton function, you can have as follows:

function textButton()
{
   pipe.send("test message');
}

But I do think you might be misunderstanding how events work in JavaScript.

On Sun, Nov 21, 2010 at 6:42 AM, kentsh <[email protected]> wrote:

> Hi,
> i have question to you, because i do not know how to implement onclick
> event on the site.
> For example i want to sent request to server, like it is in hello
> world example. the code is:
>
> client.addEvent('multiPipeCreate', function(pipe, options) {
> pipe.send('test message');
> });
>
> it is sent when user open browser and type mysite address. but what i
> want is to do this when user is clicking some button. so i did
> function
>
> function textButton{
> client.addEvent('multiPipeCreate', function(pipe, options) {
> pipe.send('test message');
> });
> }
>
> and put this function to onclick event in button, but it is not
> working.
> nothing happens...
> can someone help me how to do this?
> how to control ape events using own functions.
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<ape-project%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to