Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    mailto (html equivalent) utility required in smartgwt

    Hi,

    I am using SmartGWT 2.4 and google chrome browser.I need to perform a mailto (html) kind of functionality in which when I click on an email link,it opens the default email editor.From linkItem I only able to open a website link but not the default email editor.I have done a lot of R&D but I am unable to find a solution.

    Please help.

    Thanks in Advance
    Rahul

    #2
    What issue are you having with LinkItem? If the value for the field is eg "mailto:foo@bar.com" this works. Your problem may be that Chrome does not know what email application to launch (that is, mailto links would not work on this browser on your machine in general).

    Comment


      #3
      No it is not working.I have tested in Firefox also but the solution which you have provided is not working.i will paste 2 lines of code:

      LinkItem linkItem = new LinkItem("emailTo");
      linkItem.setValue("mailto:foo@bar.com");

      and adding this to a form.

      Issue with this is :

      1) the value which is shown when it renders is : mailto:foo@bar.com.It should be foo@bar.com.

      2) In firefox, a blank new window opens and on firefox ,nothing happens.

      Please check..

      Comment


        #4
        Yes, it is working.
        Check your browser configuration. It sounds like (as Isomorphic already mentioned) your browser does not know what to do with email link.
        Put this:
        Code:
        <html>
        <body>
        <p>
        This is an email link:
        <a href="mailto:someone@example.com?Subject=Hello%20again">Send Mail</a>
        </p>
        </body>
        </html>
        into some.html file, open it in your browser and try - you will probably get same result meaning that it is not related to SGWT.

        As for 1):
        "public void setLinkTitle(String linkTitle)
        Optional title text to display for this item's link. If unspecified the value of the item will be the title text as well as the target of the link. Method to set the linkTitle for this item
        Parameters:
        linkTitle - new linkTitle for this item. Default value is null"

        HTH
        MichalG

        Comment


          #5
          Hi,

          is there a way how to do this on a ToolStripButton click?

          Cheers,
          Martin

          Comment


            #6
            Originally posted by zdary View Post
            Hi,

            is there a way how to do this on a ToolStripButton click?

            Cheers,
            Martin
            Try this HTML mailto samples

            http://www.corelangs.com/html/links/mailto.html

            Robert

            Comment

            Working...
            X