Alpha DevCon 2018
Results 1 to 4 of 4

Thread: A5W session

  1. #1
    Member
    Real Name
    Mauro Trentini
    Join Date
    May 2007
    Location
    MELBOURNE (AUS)
    Posts
    36

    Default A5W session

    Dear All,

    Is there a way I can use Alpha5 sessions in HTML pages?
    Basically, I developed a web catalogue for e-commerce with Alpha5 version 6.
    When users log into the web catalogue, they can view just some products based on the department they belong to (for instance, User1 can view only products that belong to Department1 and so on...); I handle this with a session.<department> variable and it works just fine.

    Recently I added an external link to the web catalogue's main page for on-line reports. When users access the external link and then come back to web catalogues, the session.<department> variable is lost and the user can view all the products, not only the products that belong to his department.

    I was wondering if there's a way to carry the session variable to the external link (written in asp / html) so that when users switch from external link back to web catalogue they still can see only the department's products.



    Thanks in advance.



    MAURO

  2. #2
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,786

    Default Re: A5W session

    It's not a problem of html or a5w page names. Sessions live on the server, so when they transfer away from the Alpha server, the sessions don't apply on that other website/application. But they do persist on the Alpha website as long as the browser is not closed. So, you have a few options:

    - open the external link as a new page so the Alpha website browser stays open. They can close the other website when done, Alpha sessions will still be in play.

    - Send sessions to the other website as page variables. That may not work at all. You would have to have programming control of the other web application in order to do this.

    - If your Alpha application requires login, then save all of those session variables to a table. When the user logs back in, retrieve those values and put back into session variables.

    - Finally, and maybe your best option is to save session variables to cookies. Then when they re-open the Alpha site, even after some delay, those variables would exist as normal named variables. Cookies are of course client-side, so their availability depends on if your client accepts cookies.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  3. #3
    Member
    Real Name
    Mauro Trentini
    Join Date
    May 2007
    Location
    MELBOURNE (AUS)
    Posts
    36

    Default Re: A5W session

    Thanks Steve for the reply.

    I thought about it and I'd like to develop a solution that involves your second suggestion.
    (Send sessions to the other website as page variables. That may not work at all. You would have to have programming control of the other web application in order to do this.);
    First thing to say is that I HAVE programming control of the external application. My aim is to send a session variable (called session.dfilter) as a page variable.

    The attached screenshot shows what I tried to do but didn't work. I'm sure i'm close to the solution, maybe it's just a matter of wrong syntax or similar.

    Any help would be appreciated.




    MAURO

  4. #4
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,786

    Default Re: A5W session

    Your URL will just send a value of "session.filter", not the variable contents. You need a link something like this (minus the first line):


    Code:
    session.filter = "steve"
    if eval_valid("session.filter")
    	?"Click <a href=\"mypage.a5w?filter="+session.filter+"\">here</a> to go to my external link."
    end if
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

Similar Threads

  1. a5w page
    By Sanjay Bangalore in forum Application Server Version 8
    Replies: 3
    Last Post: 03-05-2008, 07:38 PM
  2. frameexit.a5w?
    By finditqwik in forum Web Application Server v7
    Replies: 1
    Last Post: 09-17-2006, 06:54 PM
  3. Session Variables on an a5w page
    By den1s in forum Web Application Server v7
    Replies: 4
    Last Post: 02-24-2006, 11:37 AM
  4. Open a a5w page from an a5w page
    By chandran in forum Web Application Server v7
    Replies: 2
    Last Post: 02-02-2006, 03:02 PM
  5. ASP to A5w #2
    By Bill Parker in forum Web Application Server v6
    Replies: 6
    Last Post: 03-29-2005, 01:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •