Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook



The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic

Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.

If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.

Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.

Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Showing a Dialog Component after the Video Player is closed

  • Filter
  • Time
  • Show
Clear All
new posts

    Showing a Dialog Component after the Video Player is closed


    The use case is this - After a video player is done (or closed), I would like to open a dialog (and pass it some info about the video) so that you can rate the video.

    Using the Video Player component (as implemented using Bob Moore's videos), the video player is housed in a simple grid.

    Within that grid, the field that opens the player is an image control with the OnClick event set to trigger the video player (using Action Javascript's "Open a Video Component").

    When you edit that Event, you get a window that among other things allows you to set "Window Javascript" events. Bob Moore indicates that you should add code to close out the video player. This code is added in the "On Hide" section of the Windows Javascript.

    I would like to add additional code there that will pass the id of video to a dialog component and open it.

    But I cannot find a grid method (in the available list) that would do this.

    Any ideas where to go next - or if there is another way to accomplish this??


    Re: Showing a Dialog Component after the Video Player is closed

    Updating my original post, the Windows Javascript code editor (which is available from the grid by traversing JavaScript -> OnClick -> 'Edit Action' -> OnHide) has the following grid method (among many others in the list):

    {grid.Object}.ajaxCallback(part,rowNum,xbasicFunction [,callbackURL [,additionalData]])

    I wrote an Xbasic function called 'contactus' but I don't know where to put it so that it is accessible to this grid method.

    calling it from OnHide (ie {grid.Object}.ajaxCallback('G',1,'contactus') produces a "cannot find the function" message

    I also tried writing an A5w page that holds a dialog component. This does not produce an error, but it does't produce any dialog either?

    (ie. {grid.Object}.ajaxCallback('G',1,'contactus','fb_video.a5w') )

    I can't find much detail on how to implement the ajaxCallback from inside the Windows Javascript code editor in a grid.

    Any point in the right direction would be much appreciated.


      Re: Showing a Dialog Component after the Video Player is closed

      Which Video of Bob's were you looking at - post a link here. I've think I've seen that one before, just one to make sure. Then I can see what's available.


        Re: Showing a Dialog Component after the Video Player is closed

        Ok... found the video... knew I had it tucked away in the "Golden Folder"... 'cause it's Bob's. Anyway. You don't really need to use an Ajax Callback. You can do this with a cool trick. There are probably other ways, but this is really neat.

        Start by putting a new button on your grid. You can hide it - we don't need to see it after we're done using it. In fact, we probably don't need it at all... but that will be Part 2.

        So, we have a button. For that button, add an onClick event, Action Javascript, Open a Dialog Component... and set it up to open your Rating dialog... and save it all.

        Next, go back into that onClick event. You'll see your Action Javascript there, and across the top of this window, next to the Action Javascript radio button, is another radio button labelled Text mode. Click it.

        You'll get a warning, but continue. You'll now see some Javascript that will look like this...

        Copy this code... we'll need it in a minute.

        But, while we're here, click one of the tabs at the bottom labelled "Declarations - Global". Here is all the Javascript code that calls your dialog... so cool. This all stays in place. Save all this and close it.

        Now, go back into your onHide event. After, the clearVideo method, put this...

        var rowNum = {Grid.Object}._selectedRow;
        and now paste in the code you copied earlier... this is the code that calls the function defined in that "Declarations - Global" section.

        EDIT: I forgot to detail this next part. You need to change the {grid.rowumber} part to rowNum. So, the code in the onHide event should look something like this.

        var rowNum = {Grid.Object}._selectedRow;
        Your button name may be different but the rest should be the same.

        You can hide that new button now.

        So, the onHide event clears the video, gets the current row, and makes a call to that code to open your dialog.

        Last edited by Davidk; 05-06-2012, 11:25 AM.


          Re: Showing a Dialog Component after the Video Player is closed

          This is fantastic! I am on the road, so I haven't finished coding it yet, but I see what you've done here.

          Thanks doesn't do it justice - but Thanks!


            Re: Showing a Dialog Component after the Video Player is closed


            I am getting syntax and runtime errors indicating "Unexpected ':'"

            I tried the syntax you provided and the following variation

            var rowNum = {Grid.Object}._selectedRow;

            They both yielded the same error message. I am still tracking it down.



              Re: Showing a Dialog Component after the Video Player is closed

              So sorry Bill... it's me... I forgot to detail the process of changing the call to the unbound button. The code in the onHide event should be this... with the exception of the button name. The button name is whatever yours is.

              var rowNum = {Grid.Object}._selectedRow;
              See where rowNum is being used in the button call. In the original code, {grid.rownumber} was being used because it's available. Here in the onHide event it isn't available, so we use another way of getting the current row number.
              Last edited by Davidk; 05-06-2012, 11:32 AM.


                Re: Showing a Dialog Component after the Video Player is closed

                Got it David.

                It works great!

                Thank you very much.

                Do you know if the dialog that opens has access to the data from the grid that called it? I need to pass some data to the dialog.
                If it does not, I can use sesison variables.

                Do you know of one place that lists the grid.object methods.