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

Web Based Calendar Example

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

  • Web Based Calendar Example

    Greetings All

    I thought I would post this here as an update to a thread started by Steve Wood a few months ago.

    The original thread is here

    This is my version of Steve's code available on his site. I added a few enhancements for my customer. Please see attached screenshots. I have attached a sample as well.

    Many thanks to Steve Wood and Dr. Peter Wayne (for supplying the original code). I post this in hopes that it might help someone else in the future.

    My customer is quite happy with this.......thank you once again Steve and Dr. Wayne.

    Regards,

    Jeff

  • #2
    Thank You

    Thank you for taking the time to share your sample; it is much appreciated.

    Cheers,
    Noel

    Comment


    • #3
      Re: Web Based Calendar Example

      Yes I downloaded also and liked the approach.
      One thing I noticed was, that you populate the dropdown list with ALL the employees.
      This is fine when there are not many employees. Then I noticed you have a table also with the holiday entries per employee.

      Would it be a suggestion to populate the drop down list based on this table with distinct employee entries?

      Probably gives less entries into the page. Also then you would only get the employees in the drop downlist for which holidays are scheduled. If not in the drop down, then no holidays scheduled. Just a thought.

      regards, Ron
      Last edited by rleunis; 11-06-2008, 05:26 PM.

      Comment


      • #4
        Re: Web Based Calendar Example

        Originally posted by rleunis View Post
        One thing I noticed was, that you populate the dropdown list with ALL the employees.
        This is fine when there are not many employees. Then I noticed you have a table also with the holiday entries per employee.

        Would it be a suggestion to populate the drop down list based on this table with distinct employee entries?
        regards, Ron
        Ron, yep....that is certainly a possibility. I guess that is the beauty of doing something custom. For this customer, the way I have done it will work fine. Just as reference, in the code I am not getting ALL employees but I am just getting active employees. This is not a huge business so the number of employees in the drop down is not problematic.


        Thank you for taking the time to share your sample; it is much appreciated.
        Noel...you are most welcome.

        One item of note in the example - the table that tracks the actual vacation entries does not follow "true database normalization rules" in that the employee name is recorded for every entry. In a true normalized database this would not occur, but I chose to do it this way as it elimated some complexity when it comes to actually displaying the employee name on the calendar itself.

        Regards,

        Jeff

        Comment


        • #5
          Re: Web Based Calendar Example

          Jeff Attached is a Revised Vacation Manager.
          I modified it some what to allow supervisors to approve requests.

          I am still having a problem. Maybe you or someone could help.
          I need to collect the variables from the Supt_VacApprove grid and a5w page and pass them to the Write_Approved_Request a5w.
          Right now the variables are hard coded because I cannot pass the variables.
          Any help would be appreciated.

          Thanks
          Charlie Crimmel

          Comment


          • #6
            Re: Web Based Calendar Example

            I want to thank everyone who has provided this code. It is a great fit for my new project. I am going to use the calendar on an A5W page, and run a bunch of AJAX to add and update entries. More on that as I develop.

            For now, I wanted to offer an enhancement or two. When I started playing with the Calendar, I noticed that Oct 2007 (and other months) end up with an extra week that is not needed (i.e., the current month ends on the end of week five, and thus week six is extraneous).

            So here is my work around:

            Code:
            ...
            dim month as c = wordat(session.currMonth,monthlist,crlf())
            dim start_day as c = ctod(month+"/1/"+session.currYear)
            dim dd as d
            [B]dim nw as n
            nw = ceiling((day(month_end(start_day)) + dow(start_day) - 1) / 7)[/B]
            if dow(start_day) > 1 then
                start_day = start_day - dow(start_day) + 1    
            end if
            for nweek = 1 to [B]nw[/B] 'rows of calendar
            ...
            I simply added a variable nw that would calculate how many weeks were needed (as few as 4 for February in a non-leap year where Feb 1 is a Sunday). It works wery well, and it keeps it neat and clean. It is important that it be placed where it is, as the start_day variable changes in the next line. You can see the result in the first image below.

            I also added a more noticeable highlighting of the current week and current day. I did this with a simple calculation on the dd variable:

            ?"<td vAlign=top width=500 height=60 " + iif(dd=date(),"bgcolor='#fafa80'",iif(between(dd-date()+dow(date()),1,7),"bgcolor='#fafad2'","")) + "><font size=2 style='font-weight:bold;' >&nbsp;" + day(dd)+"</font><br>"+crlf()

            This is shown in the second image below. You will have noticed in both images that I have added a new column at the end for summary info. This was needed for my program since it is tracking employee timesheet data. I needed to give a summary at the end of each week. This was added by making two changes, adding a "day" to the nday for loop and capturing that day as something different.

            for nday = 0 to 7 'columns (days of week)
            if nday < 7 then
            ...this runs the regular code if nday refers to Sun-Sat...
            else
            ...this is the code for the summary column...
            ?"<td vAlign=top width=500 height=60 bgcolor='#b0e0e6' ><font size=2 style='font-weight:bold;' >&nbsp;Summary Info</font><br>"+crlf()
            end if
            next nday
            I hope this helps, and I look forward to other ideas people have.
            Stephen Pilon
            Associate Librarian
            Christendom College

            Comment


            • #7
              Re: Web Based Calendar Example

              Jeff:


              I loved the calender. Great job! I have a question on a simpler matter. I cannot discern how you got the second window to operate as a pop up. I would love to know that secret. THanks.

              Comment


              • #8
                Re: Web Based Calendar Example

                Thanks Steve

                As I mentioned, the heavy lifting was done by Steve Wood and Dr. Wayne. I just tweaked it a bit for my needs so I was happy to post it back up to the message board for others to use.

                The onclick=window.open command is what opens the new window when you click on the calendar item. Lots of info available if you Google that term.

                Regards,

                Jeff

                Comment


                • #9
                  Re: Web Based Calendar Example

                  Stephen P.

                  Very cool additions to the calendar. Thank you for posting! I can see myself using the extra column you added for summary info on something else I have coming up.

                  Keep us up to date as you ajax work with it continues.

                  Regards,

                  Jeff

                  Comment


                  • #10
                    Re: Web Based Calendar Example

                    Originally posted by crimmelcp View Post
                    Jeff Attached is a Revised Vacation Manager.
                    I modified it some what to allow supervisors to approve requests.

                    I am still having a problem. Maybe you or someone could help.
                    I need to collect the variables from the Supt_VacApprove grid and a5w page and pass them to the Write_Approved_Request a5w.
                    Right now the variables are hard coded because I cannot pass the variables.
                    Any help would be appreciated.

                    Thanks
                    Charlie Crimmel
                    Charlie

                    Very Nice addition!

                    I unfortunately don't have time to look right now at this ....plus I am still kind of a newbie on the web side of things.

                    Hoepfully someone else can chime in.

                    Regards,

                    Jeff

                    Comment


                    • #11
                      Re: Web Based Calendar Example

                      Stephen,

                      I noticed you managed to get the time displayed. Can you share the code with us? regards, Ron

                      Just found this to work:
                      'Now get the actual appts that meet the filter criteria above and put into a crlf list
                      appts=table.external_record_content_get("[PathAlias.adb_path]\emp_vacation",\
                      "''+time(\"0h:0m\",vacdatef)+':'+alltrim(vaclnamef)+','+alltrim(vacfnamef)+'^'+vacuidf",order,filter)
                      Last edited by rleunis; 11-12-2008, 04:50 PM.

                      Comment


                      • #12
                        Re: Web Based Calendar Example

                        Hello All,

                        I've got to say that you all should be commended on your efforts and abilities to create and modify such applications. Although I have quite a bit of knowledge of VBA I am completely new and intimidated by alpha's xbasic and web applications. Its to the point where I was actually contemplating switching to PHPRunner (By Xlinesoft) just because of their calendar add-on which suits my needs perfectly. But now seeing you guys creating and modifying this calendar gives me hope that maybe I could stick this out and continue to use alpha for my application (which is what I really want to do!).
                        Thanks again and keep up the great work!

                        Regards,
                        Vince

                        Comment


                        • #13
                          Re: Web Based Calendar Example

                          Hi Vince

                          Thanks for the kind words. This Alpha Message board is AWESOME and one of Alpha's greatest assets in my opinion. I hope you stick with Alpha - it might seem daunting at first but it will come around soon enough. The more you use Alpha - the more genius you will see in it.....at least that is what happened in my case. I am just getting my feet wet with the web side but I am loving it. This board is such a great resource - I am not sure if other platforms can offer the level of professional and cordial help that is available here. Hope you stick with Alpha!

                          Regards,

                          Jeff

                          Comment


                          • #14
                            Re: Web Based Calendar Example

                            Hi Jeff

                            Soon after writing that message to the message board I got back into working with alpha and decided to stick it out (then deleted all the other trial version software I was contemplating switching to). So I'll probably see you around here as I start to run into road blocks and also when I'm ready to add the calendar section to my application.
                            Take Care and Thanks again!

                            Regards

                            Vince

                            Comment


                            • #15
                              Re: Web Based Calendar Example

                              Hi everyone,

                              This is truly awesome! Thanks to everyone!!

                              I am trying to figure out a few things though and I am stumped:

                              1. Is there a way to control the width of the columns? i.e., Wednesday is the widest column, Friday is the narrowest - is there any way to make them all equal width?

                              2. I would like to limit the number of entries in each cell of the calendar, so that if a person has say 20 appointments on a given, only 5 will show initially, with perhaps a link that says "More" which the user would click to show the next 5, and so on. This would then make the calendar look more "clean", and would assure that the calendar would always be all on one screen.

                              3. If a person has a few appointments for the month, the calendar loads quite fast. However, if they have say 100 appointments for the month, it is pretty slow, like around 10 seconds or so. Do we have to live with that, or is there a way to speed that up?

                              I am working on it, and will report back if I find answers, but I would sure appreciate any input from anyone who may have already figured these things out. Thanks!

                              Gary
                              Gary S. Traub, Ph.D.

                              Comment

                              Working...
                              X