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

Announcement

Collapse

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

Load a desktop application from application server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Load a desktop application from application server

    Hello all.

    I am a complete newb with the Alpha product line.

    I am curious if code could be put in place on a web form, and if necessary, on the desktop as an applet, that would load a local (desktop) application. Example, user is reviewing a list of service orders on web page generated by application server. User clicks on "Map It" button, the app server sends over the pertinent address information, and causes MapPoint on their desktop to load and map the sent address information.

    I am looking at doing the same thing with other apps such as Excel, Word, etc.

    Is it do-able? Any useful suggestions?

    Thanks,

    Rich

    #2
    Re: Load a desktop application from application server

    The gist with web apps is that scripts usually run on the server and then "throw" the finished HTML at the client browser. Interaction with the client machine would need to happen through client-side scripting like Javascript, because there is no direct "link" between the client PC and the web app server.

    There are various JS scripts that can do this, see here: http://www.webdeveloper.com/forum/ar...p/t-78281.html

    Comment


      #3
      Re: Load a desktop application from application server

      Thanks for the link. But all the entries there seem to discuss is creating shortcuts on the desktop using javascript. That is not what I am looking to do. I guess I need some javascript that waits for code from the server and acts upon it. (i.e. the server posts address information, the javascript gets the information, parses it and loads the local application -MapPoint in this case.)
      Are there references out there describing this type of scenario?

      Thanks,

      Rich

      Comment


        #4
        Re: Load a desktop application from application server

        Originally posted by pcsamrjc View Post
        Thanks for the link. But all the entries there seem to discuss is creating shortcuts on the desktop using javascript. That is not what I am looking to do. I guess I need some javascript that waits for code from the server and acts upon it. (i.e. the server posts address information, the javascript gets the information, parses it and loads the local application -MapPoint in this case.)
        If you redirect to a page after the server has retrieved the data, you can put the data to be used by the Javascript in a "hidden" element on the dialog or grid, which can be accessed by the Javascript.

        Since a lot of A5 WAS scripting actually generates Javascript at the client side, there may well be a function in A5 that generates the required JS already, however no matter what, you will always have to reload the window with the data from the server before any sort of script can make use of it.

        (The problem is that the server stuff can only happen at the server end, obviously, and that data can only be passed back to the browser by loading a page or re-loading it. Anything that affects the user's PC has to be done client-side, so you have to load the page with the data retrieved and use client side scripting like JS to make use of that data on the client computer)
        Last edited by NoeticCC; 01-17-2008, 04:53 PM.

        Comment


          #5
          Re: Load a desktop application from application server

          Thank you for your prompt response. Going back to your original response and the weblink you supplied... The scripts described there make no mention of grabbing the passed data and doing anything with it. Also, how do I get the client side script to run? Do I make it part of a link on the desktop that loads the javascript then loads the webpage in question? I am sorry if I am being dense here, but am just trying to wrap my brain around the entire process to make this work.

          Thanks,

          Rich

          Comment


            #6
            Re: Load a desktop application from application server

            Originally posted by pcsamrjc View Post
            Thank you for your prompt response. Going back to your original response and the weblink you supplied... The scripts described there make no mention of grabbing the passed data and doing anything with it.
            If the data passed to the loaded/redirected page is in a hidden input, Javascript can grab it relatively easily - you can actually address (read or edit) almost every element/object on the page with JS, and a lot of what A5 does in web apps is actually done through javascript generated by the web server and then thrown back at the browser.

            Say you redirect the browser to a page with a dialog on it when the user submits the form that determines their choice, you add the data into a text field (for example) called var_shortcut. The Javascript for grabbing the data would be

            document.myForm.var_shortcut.value or close to it (I can't try it right now as I am having trouble with my laptop)

            I will try to have a look when I get to work tomorrow as it is the kind of thing that I might need myself!

            Also, how do I get the client side script to run? Do I make it part of a link on the desktop that loads the javascript then loads the webpage in question?
            Nothing so complicated thankfully - all you do is add the Javascript to the A5 page's header and run it OnLoad...

            It might be easiest to put the script that creates the shortcut into a text file and saving it as shortcuts.js and call the function createShortcut(). In the header of the page you redirect to, you add:

            <script language="JavaScript" src="shortcuts.js"></script>

            And then in the <body> tag on the same page, you add: onLoad="createShortcut();"


            I am sorry if I am being dense here, but am just trying to wrap my brain around the entire process to make this work.
            No problem, I am sure there must be easier ways... I did a fair amount of work in PHP and Javascript so am used to doing things that way, but I am still learning about all the endless possibilities of A5...

            Comment


              #7
              Re: Load a desktop application from application server

              I knew there had to be an easier way:

              This is from the help file and creates a shortcut to the Alpha Sports app - if you put it in the Validate event of a dialog, you can use the contents of a control on the dialog to customise the shortcuts :)

              Here's three types of shortcuts:

              Code:
              dim desktop as C
               
              desktop = win_special_folder("desktop") 
              'Create a shortcut to Alpha Five on the desktop 
              win_create_shortcut(desktop + "\Launch Alpha Five", a5.Get_Exe_Path() + "\alpha5.exe") 
              
              'Create the shortcut with a different icon 
              win_create_shortcut(desktop + "\Launch Alpha Five",a5.Get_Exe_Path() + "\alpha5.exe", "Alpha Five is cool", "", "c:\windows\notepad.exe") 
              
              'Create a shortcut to Alphasports 
              win_create_shortcut(desktop + "\Open Alphasports", a5.Get_Exe_Path() + "\alpha5.exe", "Launch the Alphasports sample application", "", "", "\"" + a5.Get_Exe_Path() + "\samples\alphasports\alphasports.adb\"")
              Attached a sample dialog that lets you choose Excel or Word and then puts a shortcut to either OpenOffice Writer or Calc on the desktop (I don't have office installed at home).

              The shortcuts don't quite work yet but I hope the basics are clear. It's one of many many Xbasic functions that work on WAS even though it isn't obvious :) I tend to just assume it might work and try it out once I dug out an Xbasic function/script from the help file :)
              Last edited by NoeticCC; 01-17-2008, 07:02 PM.

              Comment


                #8
                Re: Load a desktop application from application server

                Just to add, having slept on this, I guess this isn't going to work on the client machine... of course it creates the shortcut(s) on the server desktop! Drats!

                This might help you untangle the different layers: http://support.alphasoftware.com/alp...e_Rendered.htm

                These two entries might help you with the Javascript: http://support.alphasoftware.com/alp...n_a_Dialog.htm

                http://support.alphasoftware.com/alp..._A5W_Pages.htm
                Last edited by NoeticCC; 01-18-2008, 05:46 AM.

                Comment


                  #9
                  Re: Load a desktop application from application server

                  You might want to think about using HTML in an Xdialog though so the user runs a desktop app that displays content from the A5 WAS, using an ActiveX Control: http://support.alphasoftware.com/alp...an_Xdialog.htm

                  http://support.alphasoftware.com/alp..._HTML_Page.htm

                  http://support.alphasoftware.com/alp...ombination.htm

                  Comment


                    #10
                    Re: Load a desktop application from application server

                    The normal process for "opening" any client side application based on server-generated files, is to create that file on the server (xls, doc, pdf, ptm(mappoint), etc.) then present a hyperlink to that file so the user can click it. The file will either open in whatever program that client has mapped to open that file type, or ask for their permission to download it. You would have to set the proper MIME format to control or guide what happens.

                    You can do "with Alpha" the same as with any other web development language. I assume your application is for a controlled group of users. You would never expect a public web application to 'just automatically' open up some client application and interact with the client in that way, Firewall permitting. Think of the horrible possibilities if you could!

                    For example, you could create your PTM file and present the link. The user clicks the link and (I don't know exactly how MapPoint works) the file will open in MapPoint or give the user a choice to a) Save, b) Open, c) Cancel.

                    If you just want to present a map to the address in question, there is no need to open any client application at all (your interest may be beyond this simple need). MapPoint, Yahoo!, Google, etc. offer online ability to map addresses. That part is easy and you can find a document on my website (Alpha WAS Programming Examples) and there is a discussion up here on Google Map.
                    Steve Wood
                    See my profile on IADN

                    Comment


                      #11
                      Re: Load a desktop application from application server

                      I somehow missed the mapping part - I should imagine that what Steve mentioned about online mapping is the solution for this particular issue with displaying maps. Google in particular has a lot of code available that lets you put Google Maps in your own websites: http://code.google.com/apis/maps/index.html

                      Comment

                      Working...
                      X