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

Log Out Control?

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

    Log Out Control?

    Am I missing something - have searched Help and forum but can find no reference to a 'Log Out' control?

    Can I, for example, place a Button on the Tabbed UI control pane which will log the current user out and redirect back to the master log in page?

    #2
    Re: Log Out Control?

    I'm not at my PC running Alpha, but i'm sure if you look at the web application demo there's a tabbed_ui that has a log out button.
    It uses the onclick javascript event to redirect to whatever page you want.

    Dale

    Comment


      #3
      Re: Log Out Control?

      If you're using Alpha Five's Security Framework, there's also this function:

      A5WS_LogoutUser()
      -Steve
      sigpic

      Comment


        #4
        Re: Log Out Control?

        Thanks Dale & Steve,

        Dale - will take a look at the demo app

        Steve - how do I attach the 'A5WS_LogoutUser()' function? I have tried adding as xBasic function to an onClick event to the button but does nothing - I am not new to programming (Perl, JS etc) BUT I am an xBasic novice!

        Thanks
        Andrew

        Comment


          #5
          Re: Log Out Control?

          Got it sorted, thanks.
          Andrew

          Comment


            #6
            Re: Log Out Control?

            The a5ws_logoutuser() function does not seem to be working. I've put it onto a screen called logout.a5w, which is called from a button on a navigation component.

            I placed it into a header as A5 code. But running it still allows me to go back using the browser back button. Should the code be placed somewhere else? I think what we are looking for is a true log-out.

            Thanks,

            Charlie

            Comment


              #7
              Re: Log Out Control?

              This is a valid logout script. I have it on a LOGOUT button or link in the program. The A5W page has NO HTML, just this xbasic including the redirect at the end to take them to the home page after logout.

              However, what you are describing is not related to login/logout. Any user can press the Back button to see what was on that page. If you refresh that page, and that page is a restricted page, you will see you are actually logged out.

              a5ws_logoutuser(session,request,response)
              session.reset()
              response.redirect("index.a5w")

              line 1 logs them out
              line 2 deletes all of my session vars
              line 3 takes them to the home page
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: Log Out Control?

                Thanks Steve. I really appreciate it.

                Charlie

                Comment


                  #9
                  Re: Log Out Control?

                  I had a similar but more basic question of how to redirect to another page (such as a log out page) from the button on a tabbed UI control.

                  This code (from the sample web application) does the redirect.

                  window.location='index.a5w';

                  I'm fairly new to this as well, and am not completely sure as to how to do the logout from that same javascript event (on click).

                  Comment


                    #10
                    Log Out Problem

                    i used the session.reset() in my program and redirect to login.a5w page. but when i click the back button in the toolbar, i was able to go back to my page.

                    i tried it in this msgboard site. i logged in and then i logged out, then clicked the back button and voila! i was sent back to my page.

                    is this a flaw in the Alpha Five? or is it normal...?

                    Comment


                      #11
                      Re: Log Out Control?

                      Under Web Security - Login Options try setting the 'Ignore Return to Page after Login' option to true.
                      Regards

                      Comment


                        #12
                        Re: Log Out Control?

                        It is normal, and normally desired, browser behavior. Changing the 'Ignore Return..' won't cure it. It is called cache and your browser keeps a history found under the Back button.

                        Someone may have found a way with Alpha to address this, but I have not. Alpha Help suggests putting this in the Head area of the page, but I find it has no effect:

                        Response.AddHeader("CacheControl: no-cache")
                        Response.AddHeader("Pragma: no-cache")
                        Response.AddHeader("Expires: -1")

                        You will also find this on the web, but it does not work when I test it:

                        meta http-equiv="pragma" content="no-cache"

                        Whatever fix someone comes up with, here are some rules I think would apply:

                        - you can't automatically clear the client's entire browser cache on logout. Imagine how upset they would be if YOU removed their browser history, which includes history other than from your application.

                        - you can't pick a solution that inhibits cache on all pages within your application because it would not run efficiently.

                        - if you try a server based solution (e.g. xbasic) you have to do something that affects the cache BEFORE they log out because once the page is cached, going Back to the page does not make a run to the server, so you cannot fire any server based process to clear the screen.
                        Steve Wood
                        See my profile on IADN

                        Comment


                          #13
                          Re: Log Out Control?

                          If you would like to disable the browser back button, you can insert the Javascript below in the head section:

                          Code:
                          <script TYPE="text/javascript">window.history.forward(1);</script>
                          or in the body section:

                          Code:
                          onload="javascript:window.history.forward(1);"
                          I think this works in most browsers.
                          Bob Moore


                          Comment


                            #14
                            Re: Log Out Control?

                            I tested Bob's solution and it works perfectly. Here is what you do.

                            Create an A5W page named logout.a5w. Put a link to this page in your application where ever you want a Logout link.

                            Here is the contents of my logout.a5w page. Ignore the 'a5w_include()' statements, that is how I bring in additional html. The key is the xbasic at the top and the body onload function.

                            HTML Code:
                             <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                            
                            <%a5
                            a5ws_logoutuser(session,request,response)
                            session.reset()
                            delete session.__protected__ulink
                            %>
                            
                            <html>
                            <head>
                            <meta name="generator" content="Alpha Five HTML Editor Version 9 Build 2095-3264">
                            
                            <%a5 a5w_include("header_head.a5w") %>
                            
                            </head>
                            <body onload="javascript:window.history.forward(1);">
                            
                            
                            <div id="wrapper">
                            <%A5 a5w_include("header_body.a5w") %> 
                            <div id="content">
                            
                            <h2>You have logged out. Please visit.....</h2>
                            
                            
                            <div class="clearfix"></div>
                            </div><!-- CONTENT -->
                            <%A5 a5w_include("footer_body.a5w") %> 
                            </div><!-- WRAPPER -->
                            </body></html>
                            Steve Wood
                            See my profile on IADN

                            Comment


                              #15
                              Re: Log Out Control?

                              Hi guys,

                              Now, I thought that is an excellent idea!

                              so I modified my logout.a5w page to include these features.
                              But the back button on my browser is still active (Firefox)
                              and
                              I can go back to my previous screen (tabbedUI) which has websecurity enabled with login required set
                              whats's worse,

                              I can then still open grids etc

                              Here's the a5w page

                              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                              <html>
                              <head>
                              <meta name="generator" content="Alpha Five HTML Editor Version 10 Build 2787-3538">
                              <!-- must use in order to make XP Themes render -->
                              <meta HTTP-EQUIV="MSThemeCompatible" content="Yes" />
                              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

                              <title></title>
                              </head>
                              <body onload=javascript:window.history.forward(1);>
                              <p align=center><img src="ServiceBillingHeader.jpg"></p>
                              <p>&nbsp;</p>
                              <p align=center>Thankyou for using Servicebilling</p>
                              <p align=center>Logout Time : <%a5

                              delete session.__protected__loginid
                              delete session.__protected__userid
                              delete session.__protected__loginguid
                              delete session.__protected__logingrp
                              delete session.__protected__logindte
                              a5ws_logoutuser()
                              session.reset()
                              ?dtoc(date(),"10")+" "+time()

                              %> </p></body></html>

                              Comment

                              Working...
                              X