Alpha Video Training
Results 1 to 8 of 8

Thread: How to pass a message box variable into my a5w page?

  1. #1
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default How to pass a message box variable into my a5w page?

    Hi all,

    I'm having trouble locating videos and/or documentation again. I would like to use the Javascript "onclickevent" to put up a message box and then pass the users choice into my A5w page that runs as another onclick even after the message box. Can someome please help me with the code needed? I basically need a conditional branch inside my a5w page based on the result of the message box. The branching I can probable figure out.....getting at the variable containing the users choice is my biggest issue.

    Thanks

  2. #2
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,297

    Default Re: How to pass a message box variable into my a5w page?

    if you've got subscriber feature packs, it's video M50.

  3. #3
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: How to pass a message box variable into my a5w page?

    Hi Chris,
    I've watched that and I understand how to make message boxes and conditional branch in javascript based on the users choices BUT what I'm looking for is how to pass a variable from the message box into an a5w page. Maybe it is easier to ask how to pass a javascript variable to the xbasic code I'm using in the a5w page.

  4. #4
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,297

    Default Re: How to pass a message box variable into my a5w page?

    I'm not sure the *right* way, but you could do an ajaxCallback to set a session variable and then use the session variable in your xBasic.

  5. #5
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    600

    Default Re: How to pass a message box variable into my a5w page?

    Check out video D66 - "Storing State Information in the Grid or Dialog Object"
    Using the 'state' info is pretty slick and allows you to pass info back and forth between javascript and xbasic.
    Jim Coltz
    Alpha Custom Database Solutions, LLC
    A5CustomSolutions.com
    jimcoltz@a5customsolutions.com

  6. #6
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: How to pass a message box variable into my a5w page?

    Quote Originally Posted by Jim Coltz View Post
    Check out video D66 - "Storing State Information in the Grid or Dialog Object"
    Using the 'state' info is pretty slick and allows you to pass info back and forth between javascript and xbasic.
    I'm not sure if that's exactly what I needed to do what I intended with the message box but it's REALLY useful and I'm sure I'll use it elsewhere. Thanks!

  7. #7
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,297

    Default Re: How to pass a message box variable into my a5w page?

    I'm in the same boat with Jim's info--I'll definitely use it at some point.

    Jinx, what are you trying to do?

  8. #8
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: How to pass a message box variable into my a5w page?

    I'd like to have a message box up and put custom buttons on it (which I have figured out how to do with various videos). These buttons would allow the user multiple choices. When the user makes a selection, the choice they made is set into a javascript variable for the message result. So far, it's great. However; now I need to read those choices in an a5w page and conditionially branch off inside that page based on the choices. The problem is easily getting that user choice transfered from javascript to serverside lingo that can be used in my page.

    I've already figured out a work around for the particular task I had in mind when I posted this question but that is only because it was an "OK" or "Cancel" option. I simply made an inline javascript onclick event:
    Code:
    msgResult = confirm('If you would like to something click OK, otherwise click Cancel.');
    
    if (msgResult == true){
    Then I put another series of onclick events here for what will execute if the user clicks ok.

    After that I put in this inline javascript onclick event:
    Code:
    ;
    }else{alert('ActionCanceled');
    }
    It's working for what I needed, but like I said; I'm pretty sure I'll need what I was looking for in the OP eventually.

Similar Threads

  1. How to pass variable value from a5w page to Dialog component ?
    By satyanarayana in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 10-19-2012, 01:54 AM
  2. Pass JS var in a5w page
    By Peter.Greulich in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 03-10-2011, 09:24 PM
  3. Pass Textbox Values Back to .a5w page.
    By shood38 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 10-25-2010, 08:12 PM
  4. pass dialog box variable to report
    By joannristau in forum Application Server Version 9 - Web/Browser Applications
    Replies: 7
    Last Post: 07-20-2009, 06:28 PM
  5. Pass Variable to List Box control
    By Doug Chanley in forum Alpha Five Version 5
    Replies: 3
    Last Post: 07-06-2003, 03:24 PM

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
  •