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

Drop down boxes

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

    #16
    Re: Drop down boxes

    Originally posted by drgarytraub View Post
    I will study this later. Thanks so much!
    I do hope I haven't confused you more than necessary - but I do remember that time, about 5 months ago, when I first looked at WAS components and, intuitively, kept trying to edit the Xbasic and HTML tabs to get what I wanted, and kept thinking programming directly in an a5w page was impossibly hard...

    ... funnily enough, it was the AJAX libraries that really kicked me into getting to grips with Xbasic in A5w pages, because I remember from ages back when I tried to adapt (successfully, but still had no clue what I was doing!) a bunch of drag & drop javascript libraries, what a major PAIN it is to code in Javascript! ;)

    Comment


      #17
      Re: Drop down boxes

      Originally posted by drgarytraub View Post
      Hi Martin,

      Where do you put the code? Does it go in the a5w page, or in the html tab of the component?

      Thanks!

      Gary
      Hi Gary - sorry about the delay - been busy today
      the code goes in the A5w page

      btw in this instance you will not need to use the Tilde "`" as you will not be
      parsing a string to extract the seperate data elements

      as to speed - Ajax vs Javascript
      there is really nothing magical about javascipt or ajax
      if you need data to populate a dropdown both cases require
      that data be fetched from the database and then sent to the client
      browser, with javascript is is done when the page is loaded so it is faster if you dont include the extra time required to load the page

      which should you use - that would depend on your needs

      if you have a small number of items for your dropdown list then
      it would seem better to use javascript - if you dont mind doing a little coding
      if on the other hand your data might include several thousand items
      then it would make more sense to use ajax and filter the data on the fly

      both cases can be dynamic (from a table) or could be hard coded
      and both could be filtered ( javascript on the page and ajax on the server)


      1st i really dont want to get crosswise with Andrea -
      if you want todo this using the Ajax functions then fire away Andea will be great help
      if you want me to lend a hand with the javascript i will be happy to
      just let me know
      regards

      martin
      www.jollygreenthumb.com

      Comment


        #18
        Re: Drop down boxes

        Originally posted by martin horzempa View Post
        as to speed - Ajax vs Javascript
        there is really nothing magical about javascipt or ajax
        if you need data to populate a dropdown both cases require
        that data be fetched from the database and then sent to the client
        browser, with javascript is is done when the page is loaded so it is faster if you dont include the extra time required to load the page
        TBH AJAX uses Javascript just as much - the difference is plain Javascript requires the values that are filled into the other boxes to be pre-loaded*, which makes them visible in the page source, and makes the initial page load slower (depending on how much data is retrieved).

        * The same effect could probably be achieved by pre-loading the detail section data in a grid
        Last edited by NoeticCC; 05-29-2008, 05:38 PM.

        Comment


          #19
          Re: Drop down boxes

          Originally posted by NoeticCC View Post
          TBH AJAX uses Javascript just as much - the difference is plain Javascript requires the values that are filled into the other boxes to be pre-loaded*, which makes them visible in the page source, and makes the initial page load slower (depending on how much data is retrieved).

          * The same effect could probably be achieved by pre-loading the detail section data in a grif
          we agree
          with javascript is is done when the page is loaded so it is faster if you dont include the extra time required to load the page
          regards

          martin
          www.jollygreenthumb.com

          Comment


            #20
            Re: Drop down boxes

            Originally posted by martin horzempa View Post
            we agree
            My point was though, that the J in AJAX stands for Javascript (the Ajax libraries in Alpha5V9 mean you can use Xbasic to generate the response, which is easier esp. if you have some Xbasic experience but not JS experience)...

            BOTH use Javascript to put data into the textboxes etc. in response to an event on the page.

            The big difference is that with AJAX you can do anything from huge database queries to file/directory scans etc. etc. dynamically WITHOUT having to load all the information needed [for every single record you could select from this dropdown] when the page is first loaded.

            When you just have a small handful of choices, and a handful of fields to be filled in, there's no reason to use AJAX, but if you have a database with thousands of records, it is MUCH faster to only retrieve the detail info when requested, rather than having to pull up and store (within the page) every field from various tables that you may or may not need to use to fill into fields on the page (depending on which selection is made).

            Comment


              #21
              Re: Drop down boxes

              Originally posted by NoeticCC View Post
              My point was though, that the J in AJAX stands for Javascript (the Ajax libraries in Alpha5V9 mean you can use Xbasic to generate the response, which is easier esp. if you have some Xbasic experience but not JS experience)...

              BOTH use Javascript to put data into the textboxes etc. in response to an event on the page.

              The big difference is that with AJAX you can do anything from huge database queries to file/directory scans etc. etc. dynamically WITHOUT having to load all the information needed [for every single record you could select from this dropdown] when the page is first loaded.

              When you just have a small handful of choices, and a handful of fields to be filled in, there's no reason to use AJAX, but if you have a database with thousands of records, it is MUCH faster to only retrieve the detail info when requested, rather than having to pull up and store (within the page) every field from various tables that you may or may not need to use to fill into fields on the page (depending on which selection is made).

              again we agree

              which should you use - that would depend on your needs

              if you have a small number of items for your dropdown list then
              it would seem better to use javascript - if you dont mind doing a little coding
              if on the other hand your data might include several thousand items
              then it would make more sense to use ajax and filter the data on the fly


              UNCLE!!!! UNCLE!!!!
              no argument here Andea, in fact you are restating my post
              i really didnt want to step on your toes - nor did i mean to
              my only point was
              if Gary wants a little help with the javascipt i'll be happy to lend a hand
              if he would rather do it using the Ajax functions then your his gal
              regards

              martin
              www.jollygreenthumb.com

              Comment


                #22
                Re: Drop down boxes

                Originally posted by martin horzempa View Post
                again we agree
                Curious - who is "we"? :)

                UNCLE!!!! UNCLE!!!!
                Auntie? :p

                no argument here Andea, in fact you are restating my post
                i really didnt want to step on your toes
                No stepping on toes at all... just wanted to point out that AJAX basically uses Javascript all the same as Javascript in an .a5w or .htm(l) page does...

                It just lets you use Xbasic (in the filename.AJAX.a5w pages), which more experienced Alpha developers may be more well-versed in, and which most definitely is easier to handle than JS!, to manipulate the elements on the page, instead of having to hand-code everything and having to pre-load every possible value you may eed to use in the Javascripts.

                (I just remember *my* initial confusion with trying to put Javascript into the HTM component etc. of the web components in Alpha 5....)

                Comment


                  #23
                  Re: Drop down boxes

                  thats why i offered to help
                  regards

                  martin
                  www.jollygreenthumb.com

                  Comment


                    #24
                    Re: Drop down boxes

                    I really, really appreciate the help that the two of you have given and are willing to continue to provide. I just cannot thank you enough.

                    Now, I really would like to learn both approaches because each would be useful in all kinds of situations.

                    Right now though I would like to start with the approach that makes the most sense for my particular situation. I want a drop down that shows the following:

                    Patient ID PtType Status

                    I would like the display to be wider than the field if possible so that all 4 columns are easily seen, and also have the columns and data below them to be evenly spaced. Then, when the user selects a choice, there are 16 fields to be automatically filled in. The number of patients is presently several hundred but needs to be able to handle thousands in the future.

                    With this information, what would be the best way to proceed?

                    And again, I thank you both for your generous time and guidance!

                    Gary
                    Gary S. Traub, Ph.D.

                    Comment


                      #25
                      Re: Drop down boxes

                      hi Gary

                      The number of patients is presently several hundred but needs to be able to handle thousands in the future.

                      as you can tell from the discussion above
                      your requirements indicate that you should be using the ajax functions and not simple javascript
                      this will give you a page that loads quickly and will be
                      extremely responsive with thousands of records

                      so i will leave you in the competent hands of Andrea
                      if you have a need for the other technique in the future
                      i'll still be happy to help
                      regards

                      martin
                      www.jollygreenthumb.com

                      Comment


                        #26
                        Re: Drop down boxes

                        Good morning Andrea,

                        Could you please guide me on the specifics of using AJAX to accomplish what I described. The name of the field that I want the drop down for is PATIENT and it is in a Grid called Patient_new.

                        When the user clicks the arrow icon, the drop down should display patients in alphabetical order, but also show 3 other coluns, with the data neatly aligned in each column.

                        When the user then clicks on the patient they want, the patient field should fill in with their selection, as well as 13 other fields.

                        If you could tell me the specific of how to implement this, I would be so grateful.

                        Gary
                        Gary S. Traub, Ph.D.

                        Comment


                          #27
                          Re: Drop down boxes

                          Originally posted by drgarytraub View Post
                          Good morning Andrea,

                          Could you please guide me on the specifics of using AJAX to accomplish what I described. The name of the field that I want the drop down for is PATIENT and it is in a Grid called Patient_new.

                          When the user clicks the arrow icon, the drop down should display patients in alphabetical order, but also show 3 other coluns, with the data neatly aligned in each column.

                          When the user then clicks on the patient they want, the patient field should fill in with their selection, as well as 13 other fields.

                          If you could tell me the specific of how to implement this, I would be so grateful.

                          Gary
                          Hi,

                          Sorry I've been off for a few days, will see if I can put together a demo ASAP but I'm a bit busy at the moment. I do believe Alpha have a copy of a sample I did and are looking to include this & an AJAX-based file uploader in one of the next releases (in the web app samples).

                          Comment


                            #28
                            Re: Drop down boxes

                            Hi Martin and Andrea,

                            Actually, I have thought more about the situation, and I think java script is the way to go for several reasons.

                            For one thing, the actual number of entries will never exceed several hundred and could be limited to 10, 20, 30, 50 or something like that. The situation is that when the user clicks on the arrow for the drop down, I want to display the current patient's most recent 20 or so appointments. The user then clicks on one of those and the fields on the appointment form are automatically filled in. So the drop down will not ever contain thousands - the table will contain thousands, but the drop down will be filtered to show only that patient's most recent appointments.

                            With this said, could you please guide me through this process?

                            Gary
                            Gary S. Traub, Ph.D.

                            Comment


                              #29
                              Re: Drop down boxes

                              Originally posted by drgarytraub View Post
                              Actually, I have thought more about the situation, and I think java script is the way to go for several reasons.
                              The J in AJAX stands for javascript...

                              The problem with JUST using Javascript is that you would have to retrieve every single piece of data you want to fill into the other fields when the page first loads, whereas if you use the built-in AJAX libraries you only pull up what is needed.

                              How many fields do you want to fill then? And to what purpose are you pulling up this data?

                              One thing you might want to look into is creating a grid, showing just one record, and using the QuickSearch option (with a dropdown) as shown in the quicksearch example of the web app samples included with Alpha5: http://www.charlesworth.biz/WAS/quicksearch_page.a5w

                              Comment


                                #30
                                Re: Drop down boxes

                                Hi Andrea,

                                Thanks again for your response.

                                I understand that the the J in AJAX stands for JavaScript, and that AJAX is implemented via JavaScript. I should have clarified this before, so let me explain. Apparently, not all browsers (e.g., pda's) work that great with complex javascript, or at least with some aspects of javascript, and it appears that the http request function is one of those situations. Thus, I am trying to stay with the most basic of javascript.

                                As far as the pre-loading issue, I need to fill approx 10 to say 14 fields, and I would be content with the drop down showing just say 4 or 5 columns with perhaps 20 to 30 records. I am not sure, but I think that would not be a major hit on speed - I could be completely wrong on this, but what do you think, given the additional details I have just provided?

                                In regard to your last paragraph, I am not sure I understand how that would solve this problem - could you explain a bit further ...

                                Thanks again for offering your insights and help - it is greatly appreciated!

                                By the way, regardless of what turns out to be the best way to go on this, simple javascript or ajax, I (and I am sure others) would really like to learn both methods.

                                Gary
                                Gary S. Traub, Ph.D.

                                Comment

                                Working...
                                X