Alpha Video Training
Results 1 to 4 of 4

Thread: Help with Javascript

  1. #1
    Member
    Real Name
    Carly thomson
    Join Date
    Jan 2012
    Posts
    5

    Default Help with Javascript

    Hi,

    I am a very early stage learner, and I would like to know if anyone can point me in the right direction to learn more about javascript, particularly in Alpha 5. I need to do something very simple and I am frustrated after hours of searching!

    I want to make a basic show/hide expression for a column in a grid to say if "field" value is Y hide column. I am sure this must be very simple but I can't seem to find the right help.

    Thank you.

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Help with Javascript

    Hi Carly,

    I'm not sure I have got this quite right. As an example you have two columns one has Y and N values and the other has something else. You want to hide the second column if the first has a value of Y. I can see your frustration, in your grid, you have two rows, in the first column, the field value is N. In the second row, the value in the first field is Y. Now do do you still want to hide the row? If you are only showing one record at a time, then either user the Show/Hide expression or put the field into a container and use the Show/Hide expression on the container.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  3. #3
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,512

    Default Re: Help with Javascript

    The Show/Hide Expression genie does not seem to be using standard javascript. There is a link with some syntax rules when you open the Show/Hide Expression genie that will help.

    I've found that it's easier to use the Show/Hide Expression property by thinking about what to Show, rather than what to Hide. That's because the Show/Hide expression will show the column if the expression evaluates to true. So it sounds like you want to Show the column if the value is not equal to Y.
    If your field name was BALL_COLOR and you want to show the value if it does not equal Y, expression would be:
    BALL_COLOR <> "Y"
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  4. #4
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,274

    Default Re: Help with Javascript

    MyField <> "Y" and MyField <> "y"

    Alpha Five is turning these simple show/hide expressions into full-fledged javascript for you, but generally, as long as you use field names, an = or <> or one of the expressions in the genie, and think that the expression is really more a "Show if this expression is true" rather than a "Show/Hide expression".

Similar Threads

  1. Action JavaScript not available in Grid Javascript function declarations
    By Clipper87 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 09-23-2010, 10:22 AM
  2. Javascript help
    By chadbrown in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 03-22-2010, 09:09 PM
  3. JavaScript
    By DOntquIT in forum Application Server Version 9 - Web/Browser Applications
    Replies: 5
    Last Post: 07-29-2008, 05:00 AM
  4. Mixing javascript and Xbasic and other javascript questions ...
    By drgarytraub in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 07-08-2008, 06:15 PM
  5. Javascript
    By andymeer@yahoo.co.uk in forum Web Application Server v7
    Replies: 2
    Last Post: 02-03-2007, 03:30 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
  •