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

  • amitloh
    replied
    Re: Log Out Control?

    Thanks Steve, this worked for me.

    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

    Leave a comment:


  • GarthMc
    replied
    Re: Log Out Control?

    Hi Bob,

    that worked... I now get redirected back to my login screen

    thanks
    Garth

    Leave a comment:


  • Bob Moore
    replied
    Re: Log Out Control?

    I ran some tests this morning on disabling the browser back button and disabling page caching ... here is what I found.

    While this code will work in IE, if added to a logout page

    Code:
    <body onload="javascript:window.history.forward(1);">
    it does not work in Firefox, Safari or Chrome. There are a couple of "hack" ways to make something like this work with JavaScript in all browsers but the results are not desireable .. they flash the restricted page for a sec and then re-direct. Not a solution that I was happy with.

    In my test case, what I really wanted to accomplish was to eliminate caching of the tabbed_UI, which is my Redirect page after login.

    As it turned out, cache control, is a bit tricky with the numerous browsers acting a bit different, with Chrome being the most challenging.

    By adding the code below to the Tabbed_UI User Defined Head Content section, I was able to disable caching of the Tabbed_UI page in IE, Firefox, Safari and Chrome.

    Code:
    <%a5
    Response.Add_Header("Pragma: no-cache")
    Response.Add_Header("Cache-Control: private, max-age=0, must-revalidate, no-store")
    %>
    As such, when the user clicks the back button from my logout page, the user is redirected to my login page with all of the browsers I tested.

    Seems to work quite reliably.

    Leave a comment:


  • DW0905
    replied
    Re: Log Out Control?

    Now I use a TabbedUI as the main menu, and have web security set with Ignore Return to Page after login. My Redirect Page Login in Web Security is set to my login component. This works perfectly well after logging in - browsing some grids - Logout - The back button on my browser takes me back to my login screen every time, not the previously viewed grid. Obviously you must ensure that every component or page you are accessing requires login or the back button will redisplay the grid again.
    Jerry Brightbill gave me the solution to this problem several months ago (Ignore Return to Page after login).

    Leave a comment:


  • GarthMc
    replied
    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>

    Leave a comment:


  • Steve Wood
    replied
    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>

    Leave a comment:


  • Bob Moore
    replied
    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.

    Leave a comment:


  • Steve Wood
    replied
    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.

    Leave a comment:


  • DW0905
    replied
    Re: Log Out Control?

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

    Leave a comment:


  • scarletmaecenas
    replied
    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...?

    Leave a comment:


  • gkpurcey
    replied
    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).

    Leave a comment:


  • Charles Hoens
    replied
    Re: Log Out Control?

    Thanks Steve. I really appreciate it.

    Charlie

    Leave a comment:


  • Steve Wood
    replied
    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

    Leave a comment:


  • Charles Hoens
    replied
    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

    Leave a comment:


  • UK_User
    replied
    Re: Log Out Control?

    Got it sorted, thanks.
    Andrew

    Leave a comment:

Working...
X