Alpha DevCon 2018
Results 1 to 7 of 7

Thread: How to copy event Action Javascript to another event?

  1. #1
    Member
    Real Name
    Ben Sacherich
    Join Date
    Mar 2014
    Location
    Pittsburgh, PA
    Posts
    94

    Default How to copy event Action Javascript to another event?

    Is there an easy way in the Alpha IDE to copy or move Action Javascript from one event to another?

    I put code into the dblClick event and I want to move it to the click event. I realize I can "View JavaScript" and copy the code into a new event but then I will lose the ability to edit the Action Javascript using an interactive dialog. Also this doesn't work well if there are multiple actions.

    I was hoping that I could right click on the dblClick property and use the Copy option from the menu, and the similar Paste option to the click event. That does not do anything. Can someone explain what the right click Copy option is useful for?

    2018-01-06_15-17-28.png

  2. #2
    Member
    Real Name
    Alex
    Join Date
    Oct 2015
    Location
    Perth, WA Australia
    Posts
    97

    Default Re: How to copy event Action Javascript to another event?

    No option to copy other then copying the entire control over or converting into javascript. This feature to copy and paste action javascript has been added to the lastest pre-release version. If i know i am going to use the action javascript more then once i define it in the Javascript Actions and call it from the Action event.


    Javascript Actions.png
    Alex Collier

    "Give a man a fish and you will feed him for a day; teach a man to fish and he will eat forever."

    Version 12.4.5.2 Build 4770 >> Deploying to IIS 8.5 on Windows 2012 R2 Server in AWS

  3. #3
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,380

    Default Re: How to copy event Action Javascript to another event?

    From the menu at the top choose 'Move Javascript Code to different event'

    Move javascript code.png

  4. #4
    Member
    Real Name
    Michael Cornford
    Join Date
    Oct 2011
    Location
    East Sussex, UK
    Posts
    884

    Default Re: How to copy event Action Javascript to another event?

    I think if I was going to use the javascript more than once I would use "JavaScript actions"

    Re using JavaScript.png

  5. #5
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,495

    Default Re: How to copy event Action Javascript to another event?

    I think Alpha heard you ... latest pre-release notes include...

    UX and Grid Component - Javascript Actions - Duplicate Action - You can now duplicate Javascript actions.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  6. #6
    Member
    Real Name
    Ben Sacherich
    Join Date
    Mar 2014
    Location
    Pittsburgh, PA
    Posts
    94

    Default Re: How to copy event Action Javascript to another event?

    Quote Originally Posted by Lance Gurd View Post
    From the menu at the top choose 'Move Javascript Code to different event'

    Move javascript code.png
    Thank you Lance, that is exactly what I was looking for.

    It would be nice if the dialog gave me the option to Copy or Move.

  7. #7
    Member
    Real Name
    Ben Sacherich
    Join Date
    Mar 2014
    Location
    Pittsburgh, PA
    Posts
    94

    Default Re: How to copy event Action Javascript to another event?

    Quote Originally Posted by mikeallenbrown View Post
    I think Alpha heard you ... latest pre-release notes include...

    UX and Grid Component - Javascript Actions - Duplicate Action - You can now duplicate Javascript actions.
    Thanks for pointing that out Mike. The description is a bit vague. Does this mean duplicate as in "create a duplicate right below this one" or will it let you copy it and put it in another event?


    Build 4811 for anyone reading this in the future. http://aadocuments.s3.amazonaws.com/...easeNotes.Html
    Last edited by Ben S.; 01-12-2018 at 10:10 PM.

Similar Threads

  1. Replies: 9
    Last Post: 05-05-2014, 03:08 PM
  2. Can you duplicate an action javascript (or copy it)?
    By parkjammer in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-05-2013, 03:22 PM
  3. xDialog - Event Action
    By johnkoh in forum Alpha Five Version 9 - Desktop Applications
    Replies: 0
    Last Post: 07-12-2010, 11:30 AM
  4. JavaScript from xbasic event
    By frankbicknell in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 04-29-2010, 10:28 PM
  5. How do I set conditional action on an Oninit event?
    By Wanda Tucker in forum Alpha Five Version 7
    Replies: 20
    Last Post: 07-26-2006, 09:12 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
  •