Alpha Video Training
Results 1 to 5 of 5

Thread: list control dynamic image open native email client

  1. #1
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default list control dynamic image open native email client

    The onclick event in the dynamic image properties tab allows you to use action javascript. The AJ menu has an action to dial a phone number or open a SMS client.
    However it doesn't include opening an email client. How can I open the native email client on the onclick event ? Can I just use javascript?
    Thanks,
    Bob

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: list control dynamic image open native email client

    Yes, you can use Javascript. There's a lot of info missing from your post. With the assumption you're using a List Control... here's the code you'd need...

    Code:
    var email = 'test@test.com';
    var subject = 'email test subject';
    var bodyEmail = 'email test body';
    var mailtoLink = 'mailto:' + email + '?subject=' + subject + '&body=' + encodeURI(bodyEmail);
    window.location.href = mailtoLink;

  3. #3
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default Re: list control dynamic image open native email client

    So it would be in the currently selected row of a listcontrol list, needed to get the value of the column in the row.
    var city = 'test city'
    var email = {dialog.object}.getValue('list::mylist::Email');
    var subject = 'email test subject';
    var bodyEmail = 'email test body';
    var mailtoLink = 'mailto:' + email + '?subject=' + subject + '&body=' + encodeURI(bodyEmail);
    window.location.href = mailtoLink;
    Wonder why it is not a prebuilt javascript action, since there is one for SMS, and to dial a phone number? This allows me to use a mail icon in a dynamic image onclick event in a list control row.
    Thanks!

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: list control dynamic image open native email client

    There's no need to use .getValue. Since you're already in the List, so to speak, you can use objects that are available inside your click event. One of these is data.
    If your List field is named Email... then you can do this...

    Code:
    var email = data.Email;
    To answer your question about why there is no action for this... it's because there isn't a formal development process within Alpha. Someone thinks of something and adds it in. There is no discussion, and little testing. If there were any discussion process, then adding SMS and Dialing would have come up in a development meeting, development and testing assignments would have been established... and someone would have said that if SMS and Dialing is being added, shouldn't Email be added as well... and what else can we do since we're in that area.

  5. #5
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default Re: list control dynamic image open native email client

    Gotcha data makes it easy.
    That would be a more comprehensive approach.
    Along the same lines as phone, sms, email would be interfacing with
    Apple, and google contacts. Noticed that apple autofill from contacts pops up on some of my mobile ux forms.
    Accessing contacts and pushing and pulling info to and from them would be handy. Anyone doing this?

Similar Threads

  1. Dynamic image in list
    By Tom Henkel in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 04-27-2018, 02:01 PM
  2. List/Detail View with List Dynamic Image
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 08-29-2016, 05:24 PM
  3. Dynamic Image in List...
    By cavj1 in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 05-17-2016, 05:30 PM
  4. Dynamic image in List control
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 05-11-2015, 02:09 PM
  5. Dynamic Image for Showing a record is open
    By Turnbullca in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 11-01-2011, 06:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •