depending on the platform, this works, but always pops up a blank
browser window,... I was trying to avoid that....

On May 31, 11:40 pm, Ian Bambury <[email protected]> wrote:
>         final Button button = new Button("button", new ClickHandler()
>         {
>             @Override
>             public void onClick(final ClickEvent event)
>             {
>                 Window.open("mailto:[email protected]";, "_blank", "");
>             }
>         });
>
> Ian
>
> http://examples.roughian.com
>
> 2009/6/1 Dean S. Jones <[email protected]>
>
>
>
> > this is a little hackey, and doesnt work in hosted mode, but...
>
> > public void onModuleLoad() {
> >                final Button sendButton = new Button("Send");
>
> >                RootPanel.get("sendButtonContainer").add(sendButton);
>
> >                sendButton.addClickHandler(new ClickHandler()
> >                {
> >                        public void onClick(ClickEvent event) {
> >                                mailto("[email protected]","hello");
> >                        }
> >                });
> >        }
>
> >        public void mailto(String address, String subject)
> >        {
> >                this.mailtoImpl(address, URL.encode(subject));
> >        }
>
> >        private native void mailtoImpl(String address, String subject) /*-{
> >                $wnd.location = "mailto:"; + address + "?subject=" +
> > subject;
> >        }-*/;
>
> > On May 31, 10:13 pm, "Donald.W.Long"
> > <[email protected]> wrote:
> > > Hi all,
>
> > > Most likely this is a stupid question but what I need to do is have a
> > > button that the user hits and then it does the normal mailto: href.
>
> > > What is the code to accompilish this?
>
> > > Thanks and sorry for such a simple question.
>
> > > Donald W. Long
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to