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

HTML 5 atrributes

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

    HTML 5 atrributes

    Hi All,

    First post for someone coming from Clarion. The paradigm in Alpha is pretty different from what I am used to, so please bear with me as I get to grips with Alpha 5. (Liking what I see so far!)

    My first question is on HTLM 5 attributes, specifically, the number field.

    Is there a way I can set the attributes for min, max, default and step values?

    I want to be able to set a default of zero (which I guess can be done through the initial value setting under Display settings), a min of -20 a max of plus 20 and a step of 0.25.

    Something along the line of <input type="number" min="-20" max="20" step="0.25" value="0"/>

    TIA

    Phil

    #2
    Re: HTML 5 atrributes

    Welcome to Alpha 5, Phil. Here's a couple of tips to get some replys. Identify what you're working in... e.g. a Grid, a Dialog, opening a grid from a dialog, client-side code, server-side code etc. Answers to a question can be so completely different depending on which area you're working in. Explain, with a bit of detail, and maybe even a screenshot, overall what you're trying to get done. Here's what I'm doing, here is what I want to happen... that sort of thing. Quite often a question may be asked that has a couple of answers if a few details are given.

    Anyway... on to your question. Here's one way you could get this done, but all browsers don't support some of this stuff. Here's something I found that might be useful.

    http://wufoo.com/html5/attributes/04...some_number=10

    Alpha 5 Live Preview doesn't render this, but running my grid in Chrome does.

    Get into the properties of the field you're working on in a grid. Get to Text Box Properties, set the HTML 5 Type to number, and then, in the same area, set the In-line Style to

    Code:
    input type="number" min="-20" max="20" step="0.25" value="0"
    Hope that helps a bit.

    Comment


      #3
      Re: HTML 5 atrributes

      w3schools says: "The step attribute is currently only supported in Opera and Chrome."
      Probably not a good direction to go in yet.

      However, you can get this functionality very easily by setting your field validation (client-side is all you need). This is very standard in A5 and there are lots of videos for this.

      David, you an I seem to be busy beavers in the forum, and often at identical times ... you are an excellent advocate of A5, btw...

      Comment


        #4
        Re: HTML 5 atrributes

        Hi David,

        Thanks for the response. I'll try and be bit more precise in future.

        I'd tried putting those attributes in the code section of the inline style dialog, but Alpha seemed to keep stripping them out.

        This is for an inhouse application, and so I have the benefit of telling my staff which browser they have to use <g>

        Thanks once again, this seems to work perfectly.

        Phil

        Comment


          #5
          Re: HTML 5 atrributes

          Hi Andy,

          As I replied to David, this is for an inhouse application. I can specify which browsers are to be used.

          Coming from the desktop version of the application written in Clarion over the last twenty years or so, they are used to having spin boxes to enter some types of numeric data, so the numeric control of HTML 5 works very well.

          Thanks for your reply.

          Phil

          Comment


            #6
            Re: HTML 5 atrributes

            Phil,

            Here's a screen shot of my grid field properties. I just checked again in Chrome and all the attributes are there. It's an in-line style so Alpha just shoves in whatever you enter. I don't think it's even looked at because if it's wrong the html shows up on display.

            Andy... you too, thanks... I enjoy reading your ideas and solutions for anything and everything... tucking them away for when I need them.
            Attached Files

            Comment


              #7
              Re: HTML 5 atrributes

              Hi David,

              I have it working, but only by entering directly into the grid field properties. When I try entering the attributes under the code section of the Style Editor dialog, the information isn't retained. Try clicking the ellipsis with that inline code in the grid to bring up the Style Editor and you should find the attributes for the min, max, default and step are lost.

              I have it working now. I set the things I want in the Style Editor and then add then rest of the inline code in the grid properties.

              Thanks for taking the time to check things out.

              Phil
              detailview.jpgstyleeditor.jpg

              Comment


                #8
                Re: HTML 5 atrributes

                Oh yeah... gross... didn't even try going into the editor... Glad you got it working.

                Comment


                  #9
                  Re: HTML 5 atrributes

                  Originally posted by Davidk View Post
                  Phil,

                  Here's a screen shot of my grid field properties. I just checked again in Chrome and all the attributes are there. It's an in-line style so Alpha just shoves in whatever you enter. I don't think it's even looked at because if it's wrong the html shows up on display.

                  Andy... you too, thanks... I enjoy reading your ideas and solutions for anything and everything... tucking them away for when I need them.
                  David in the screenshot your method produces invalid HTML; style="input type=" is not a valid style and there is an extra quote after value="0"

                  You need to close out the quote of the style object and leave off a quote at the end of the style as A5 will automatically put in quotes around the style properties. I just made a quick example.



                  Using_HTML5_in_style.PNG
                  HTML5_output.PNG

                  Comment


                    #10
                    Re: HTML 5 atrributes

                    Hey Luke,

                    I'm not getting any errors... I wonder what's happening? I thought it might be that if you removed the input type then you'd have trouble... but no. I've tried...

                    width: 55px; min="-20" max="20" step="0.25" value="0"
                    width: 55px; input type="number" min="-20" max="20" step="0.25" value="0"
                    input type="number" min="-20" max="20" step="0.25" value="0"
                    width: 55px;" min="-20" max="20" step="0.25" value="0

                    All with no errors and all working correctly under Chrome... except for the last one in which I do not get a default starting value of 0

                    Wierd.

                    Comment


                      #11
                      Re: HTML 5 atrributes

                      Hi Luke,

                      If you don't put in the closing quote, then Chrome seems to find there is a space after the last value entered. This means it has "0.25 " rather than "0.25" as the step value with the following inline code in the grid edit box

                      width: 70px; text-align: right; " min="-20" max="20" step="0.25" works
                      width: 70px; text-align: right; " min="-20" max="20" step="0.25 doesn't

                      This is using Chrome 20

                      Regards,

                      Phil

                      Comment


                        #12
                        Re: HTML 5 atrributes

                        Originally posted by Davidk View Post
                        Hey Luke,

                        I'm not getting any errors... I wonder what's happening? I thought it might be that if you removed the input type then you'd have trouble... but no. I've tried...
                        The input type is already set by alpha five so you should not define it again. This element is set in the "HTML5 type" setting field in A5. Modern browsers do there best to figure out errors such as extra quotes and ignore sytles they do not recognize but "input type=" is not a valid style, you need to put a quote before any html tags \ elements to closeout the style property. I always try to produce proper HTML even if it does not throw an error as down the road it can be a real pain to troubleshoot.

                        width: 55px; min="-20" max="20" step="0.25" value="0"
                        width: 55px; input type="number" min="-20" max="20" step="0.25" value="0"
                        input type="number" min="-20" max="20" step="0.25" value="0"
                        width: 55px;" min="-20" max="20" step="0.25" value="0

                        All with no errors and all working correctly under Chrome... except for the last one in which I do not get a default starting value of 0
                        The starting value should not be set as that is also set by A5. You can manipulate it through the "initial value" and "display formatting" fields in A5.


                        Originally posted by PhilM1965 View Post
                        Hi Luke,

                        If you don't put in the closing quote, then Chrome seems to find there is a space after the last value entered. This means it has "0.25 " rather than "0.25" as the step value with the following inline code in the grid edit box

                        width: 70px; text-align: right; " min="-20" max="20" step="0.25" works
                        width: 70px; text-align: right; " min="-20" max="20" step="0.25 doesn't
                        Ah, good catch. It seems A5 is adding a space before it is adding the closeout quote on the style element. This can be fixed by adding a tag that accepts a string value to the end like "alt" for example.

                        Using a style in A5 as (just an example, not useful for what my field is used for):
                        Code:
                        width: 55px; " min="-20" max="20" step="0.25" alt="order qty
                        Produces the following html:
                        HTML Code:
                        <input id="O.V.R1.ORDER_QTY_C" onclick="this.select();" style="width: 55px; " min="-20" max="20" step="0.25" alt="order qty " size="3" maxlength="3" class="MobBlueEdit" type="number" name="V.R1.ORDER_QTY_C" value="0">
                        Since "alt" is a string value it will not throw an error having an extra space before the quote, it is just descriptive help text.
                        Last edited by LukeS; 07-29-2012, 05:44 PM.

                        Comment


                          #13
                          Re: HTML 5 atrributes

                          Hi Luke,

                          It seems to be working fine with the closing quote at the end, rather than specifying an additional attribute. Hopefully, the inline grid entry will be changed to fix the adding a space, and the Style Editor will allow for things it hasn't yet thought of <g>

                          I worry that the additional closing quote will mess things up, but so far, so good. Chrome doesn't seem to add an extra quote to the attribute, so I think I will run with this for a while.

                          It produces the following

                          <input id="GRID1.D.V.R1.R_SPH" style="width: 70px; text-align: right; " min="-20" max="20" step="0.25" "="" size="9" maxlength="9" class="OMSStandardEdit" type="number" name="V.R1.R_SPH" value="0.25" a5originalvalue="0.25">

                          I have the initial value set up in the 'normal place' on the Display settings of the field properties, and not in the inline section.

                          So far, so good. All seems to be working in the way I had hoped.

                          Phil

                          Comment

                          Working...
                          X