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

detecting and announcing loss of internet connection

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

    detecting and announcing loss of internet connection

    I have a customer that is using a tablet with a mobile phone data connection
    if they loose their connection, the grid remains active (they do anything that does not require a callback)
    but if they try to save, nothing happens
    I have an auto refresh on the grid and it continues to fire, but nothing happens
    I need a way to pop up a message that the internet connection is lost
    Bruce Rainwater

    #2
    Re: detecting and announcing loss of internet connection

    That would be a very cool thing to have. I have a customer who has a wireless connection that is spotty, and they keep calling me because things start to act funny when they lose connection. Like... some lookup fields that do an ajax callback to populate list are suddenly empty, etc., etc..... Would be great if there was a way to detect if the connection is there before any ajax callback and pop up a message if its not.

    I wonder if the client side event beforeAjaxCallback can be used to call a function that tries to connect and pops up a message if it cannot.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

    Comment


      #3
      Re: detecting and announcing loss of internet connection

      It would be better, of course, if Alpha had something built in to do that so we wouldn't have to remember to do it on every component. Then at the top of the Properties for the grid under the 'Ajax' section, they could have a property like 'Warn if Connection is Lost' that we can turn on or off based on our preference.
      Carol King
      Developer of Custom Homebuilders' Solutions (CHS)
      http://www.CHSBuilderSoftware.com

      Comment


        #4
        Re: detecting and announcing loss of internet connection

        I handle this two ways. I have a grid for users to use in low connection areas that shows all the data they need to edit on one page, which can sometimes be up to 400 records. It does not have any features that use callbacks except for save. I then have a multi-page grid for use with more stable connections. On both grids I display a message to the user when saving to let them know a save is in progress. I put a DIV in the free form edit region under the grid that has a CSS3 spinner animation that says saving, when the user clicks submit \ save the canGridSubmit client side event fires with the following code:
        Code:
        jQuery('#DIVsubmitMsg').show('fast');
        This message is hidden after the grid is submitted with the afterGridSubmit event
        Code:
        jQuery('#DIVsubmitMsg').hide('fast');

        Here is the code in the free form edit region
        Code:
        <div id="DIVsubmitMsg" style="display: none">
         <div class="labeled">
            <div class="spinner">
              <div class="bar1"></div>
              <div class="bar2"></div>
              <div class="bar3"></div>
              <div class="bar4"></div>
              <div class="bar5"></div>
              <div class="bar6"></div>
              <div class="bar7"></div>
              <div class="bar8"></div>
              <div class="bar9"></div>
              <div class="bar10"></div>
              <div class="bar11"></div>
              <div class="bar12"></div>
            </div>
            <strong>Please wait, your order is being saved&hellip;</strong>
          </div>
        <br />
        If this message does not go away in a few seconds there is an issue with your internet connection.&nbsp;
        Please go to another location and re-press the "save" button.<br /><br /></div>
        Here is the CSS code I store in a separate CSS file
        Code:
        /* Spinner
        http://37signals.com/svn/posts/2577-loading-spinner-animation-using-css-and-webkit
        http://s3.amazonaws.com/37assets/svn/461-spinner.html
        http://s3.amazonaws.com/37assets/svn/463-single_spinner.html
        */
        
        div.spinner {
              position: relative;
              width: 100px;
              height: 100px;
              display: inline-block;
            }
            
            div.spinner div {
              width: 12%;
              height: 26%;
              background: #000;
              position: absolute;
              left: 44.5%;
              top: 37%;
              opacity: 0;
              -webkit-animation: fade 1s linear infinite;
              -webkit-border-radius: 50px;
              -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.2);
            }
            
            div.spinner div.bar1 {-webkit-transform:rotate(0deg) translate(0, -142%); -webkit-animation-delay: 0s;}    
            div.spinner div.bar2 {-webkit-transform:rotate(30deg) translate(0, -142%); -webkit-animation-delay: -0.9167s;}
            div.spinner div.bar3 {-webkit-transform:rotate(60deg) translate(0, -142%); -webkit-animation-delay: -0.833s;}
            div.spinner div.bar4 {-webkit-transform:rotate(90deg) translate(0, -142%); -webkit-animation-delay: -0.75s;}
            div.spinner div.bar5 {-webkit-transform:rotate(120deg) translate(0, -142%); -webkit-animation-delay: -0.667s;}
            div.spinner div.bar6 {-webkit-transform:rotate(150deg) translate(0, -142%); -webkit-animation-delay: -0.5833s;}
            div.spinner div.bar7 {-webkit-transform:rotate(180deg) translate(0, -142%); -webkit-animation-delay: -0.5s;}
            div.spinner div.bar8 {-webkit-transform:rotate(210deg) translate(0, -142%); -webkit-animation-delay: -0.41667s;}
            div.spinner div.bar9 {-webkit-transform:rotate(240deg) translate(0, -142%); -webkit-animation-delay: -0.333s;}
            div.spinner div.bar10 {-webkit-transform:rotate(270deg) translate(0, -142%); -webkit-animation-delay: -0.25s;}
            div.spinner div.bar11 {-webkit-transform:rotate(300deg) translate(0, -142%); -webkit-animation-delay: -0.1667s;}
            div.spinner div.bar12 {-webkit-transform:rotate(330deg) translate(0, -142%); -webkit-animation-delay: -0.0833s;}
        
             @-webkit-keyframes fade {
              from {opacity: 1;}
              to {opacity: 0.25;}
            }
            
            /* end basic spinner styles*/
            
            div.container {
              display: inline-block;
              padding: 1.5em 1.5em 1.25em;
              background: rgba(0,0,0,0.8);
              -webkit-box-shadow: 1px 1px 1px #fff;
              -webkit-border-radius: 1em;
              margin: 1em;
            }
            
            div.container.grey {background: rgba(0,0,0,0.2);}    
            div.container.grey.blue {background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #0a2744), color-stop(1, #064483));}
            
            div.container div.spinner {
              width: 28px;
              height: 28px;
            }
            
            div.container.grey div.spinner {
              width: 60px;
              height: 60px;
            }
            
            div.container div.spinner div {background: #fff;}
            
            div.labeled {
              font-family: sans-serif;
              font-size: 14px;
              margin: 0 auto;
              background: #fff;
              padding: 0.5em 0.75em 0.5em 0.5em;
              display: inline-block;
              color: #c00;
              line-height: 25px;
              -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.4);
              -webkit-border-radius: 1em;
              background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #ccc));
            }
            
            div.labeled div.spinner {
              float: left;
              vertical-align: middle;
              width: 25px;
              height: 25px;
              margin-right: 0.5em;
            }
            
            div.labeled div.spinner div {background: #c00;}

        Comment


          #5
          Re: detecting and announcing loss of internet connection

          Luke,
          That's cool - you should post a screen shot of how that looks.

          Another approach is to write a script to use the xbasic ping function via regular (scheduled via javascript) callbacks if you wanted a regular feedback displayed in a DIV:
          http://wiki.alphasoftware.com/Ping+Function

          If you don't have an autorefresh set up already, then this may work (I've never tested the approach).
          http://www.9lessons.info/2009/07/aut...onds-with.html

          Sorry about the vagueness, just ideas....

          Comment


            #6
            Re: detecting and announcing loss of internet connection

            Originally posted by agillbb View Post
            Luke,
            That's cool - you should post a screen shot of how that looks.
            Here is a screen shot of what it looks like, the spinner is animated too..

            saving_message.PNG


            Originally posted by agillbb View Post
            Another approach is to write a script to use the xbasic ping function via regular (scheduled via javascript) callbacks if you wanted a regular feedback displayed in a DIV:
            http://wiki.alphasoftware.com/Ping+Function
            I like the ping idea, I would use jQuery callback instead of A5 callback as the A5 callback is bigger and slower. The ping xbasic function would not work though as it is server-side not client-side. In the callback you could just have it call a a5w page that returns true. If the callback timesout you know there is a connectivity problem. JQuery allows you to set a timeout in the ajax callback so if the jQuery ajax callback timesout you could show a warning message in a DIV.
            Last edited by LukeS; 07-19-2012, 06:28 PM.

            Comment


              #7
              Re: detecting and announcing loss of internet connection

              An Xbasic ping would test the server's connection from it to some specified destination, which is not what you need. If you can make any callback at all to the server, and it succeeds, it is pretty safe to assume the client's connection to the server is active.

              Lenny Forziati
              Vice President, Internet Products and Technical Services
              Alpha Software Corporation

              Comment


                #8
                Re: detecting and announcing loss of internet connection

                good point....ignore the ping comment....unless you are testing a connection to Google maps or something on the "outside".

                Comment

                Working...
                X