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

Events firing up before time??

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

    Events firing up before time??

    I have the following code an a .a5w page. I hope it posts ok.




    dim cMessage as C
    cMessage="Not Clicked"
    %>

    TEST EVENTS



    cMessage="Clicked"
    %>
    >

    ? cMessage
    %>




    When I run the page it looks as if the onclickevent fires up or it doesn't fire up at all, and maybe the page is just capturing the change on cMessage.
    Is the code right??
    What am I doing wrong??
    Is this how we are supposed to work with events??

    Thanks

    The Mexican
    The Mexican

    #2
    RE: Events firing up before time??

    Previous didn't post correctly.
    I am also attaching a picture of my page when it loads.


    "head"
    "%a5
    dim cMessage as C
    cMessage="Not Clicked"
    %"
    "meta name="generator" content="Alpha Five HTML Editor""
    "title"TEST EVENTS"/title"
    "/head"
    "body style="text-align:center""
    "p" "input type="button" name="btnChange" value="CHANGE" onclick="%a5
    cMessage="Clicked"
    %"
    ""/input""br"
    "%a5
    ? cMessage
    %"
    "/p"
    "/body"

    The Mexican
    The Mexican

    Comment


      #3
      RE: Events firing up before time??

      Sorry, here is the picture
      The Mexican

      Comment


        #4
        RE: Events firing up before time??

        Hi Mario,

        What exactly is your button supposed to do? What is the end result you are trying to accomplish with the onclick event?

        Cheryl
        Cheryl
        #1 Designs By Pagecrazy
        http://pagecrazy.com/

        Comment


          #5
          RE: Events firing up before time??

          This was just to test the events on a button.
          When I click on the button I want the cMessage variable to change to "Clicked".

          When the page loads the message under the button says "Not Clicked"
          What I want is when I click the button the message to change to "Clicked"
          I am trying to use the button's onclick event, putting A5 code instead of javascript of VBscript.
          Simple as that.

          The Mexican.
          The Mexican

          Comment


            #6
            RE: Events firing up before time??

            This web tutorial shows how to use Request.script_name to submit a page back to itself, which allows you to respond to the status of variables. Cascading Selection Lists.

            Comment


              #7
              RE: Events firing up before time??

              Mario, your difficulty arises because you are trying to program a client-side event using server-side technology.

              The button's onClick event fires in the web browser (client side) and must use a client-side language (Javascript). When this event fires, there is no knowledge of Xbasic or A5W code. What your page is doing instead is running the A5W code on the server and then sending the following back to the browser:

              "input type="button" name="btnChange" value="CHANGE" onclick=cMessage="Clicked" "

              This is not valid HTML syntax and as a result you get a broken display.

              What ultimately are you trying to accomplish?

              -Lenny

              Lenny Forziati
              Vice President, Internet Products and Technical Services
              Alpha Software Corporation

              Comment


                #8
                RE: Events firing up before time??

                I am just experimenting with elements' events. I am learning HTML and I though I could substitute JavaScript code with A5 Web server code.

                Thanks for the reply. What is the correct way to respond to elements events using A5 code??
                Can we even respond to this events using a5 code instead of Javascript??
                I haven't check Edward's suggestion in a previous post, but I will later on today.

                The Mexican.
                The Mexican

                Comment


                  #9
                  RE: Events firing up before time??

                  I think what Mario is trying to do is learn/find out how to use server side events on WAS. In other words, he would like to know how to convert the events that are within a desktop application and use them on WAS.

                  I have been looking through some of the tutorials and have not yet been able to locate an answer for him, but I am sure you guys know :)
                  Cheryl
                  #1 Designs By Pagecrazy
                  http://pagecrazy.com/

                  Comment


                    #10
                    RE: Events firing up before time??

                    After I checked the example I still notice that you are using JavaScript to respond to events. In the example case you coded the onchange event with JavaScript.

                    I guess we cannot respond to elements events using "%a5 %"
                    code. If I am wrong please guide me where I can find examples.
                    Sorry for all this questions but I am really trying to understand all this.

                    The Mexican
                    The Mexican

                    Comment


                      #11
                      RE: Events firing up before time??

                      The HTML events cannot use Xbasic, they must use a language supported by the web browser, which currently means Javascipt if you want it to run in all browsers.

                      What you can do instead hoever is have the onClick event submit the form back to the server and then let the server take an appropriate action via Xbasic. You can see an example of this at http://was.alphasoftware.com/web_applications_demo/default/Dialog_wCascadingLookup.a5w

                      -Lenny

                      Lenny Forziati
                      Vice President, Internet Products and Technical Services
                      Alpha Software Corporation

                      Comment


                        #12
                        RE: Events firing up before time??

                        You got it!!!

                        Gracias Cheryl.


                        The Mexican
                        The Mexican

                        Comment


                          #13
                          RE: Events firing up before time??

                          If you're manually coding an A5W page as in this example, there are no "events" per se. Each time your page is requested, it executes the Xbasic code within the tags and sends the result to the browser. Using hyperlinks and forms, you can control the requests sent to the server and have your code do different things based on various conditions. Attached is an example page.

                          There are two things to note in this example:

                          I dim the variable "favcolor" before I test it. The first time this page is requested by the browser, the variable will not exist so it must be created before we can work with it. When each of the buttons are clicked, the form is requested again and a value is set for this variable. We could alternatively use eval_valid() to see if the variable exists or not instead of blindly dimming it.
                          The form action is "". request.script_name is a special variable available to all of your A5W pages that holds the name of the currently running page. By using this as our form action, the form will always submit back to itself, even if the page is renamed, moved to a different directory, included in another page, etc.

                          -Lenny

                          Lenny Forziati
                          Vice President, Internet Products and Technical Services
                          Alpha Software Corporation

                          Comment


                            #14
                            RE: Events firing up before time??

                            Thanks, will take a look at it tomorrow.
                            The Mexican

                            Comment


                              #15
                              RE: Events firing up before time??

                              I am working off of the WebAppServerDemo template with a cascading lookup that is fired off of the Customer ID instead of the Company name, similar to "Dialog_wCascadingLookup.a5w"

                              I am trying to use three different web components which are similar to each other, on the same page, one component for Sold From, one for Bill To and one for Ship To. I have changed the variable names on the second component to Customer_Id2, Company2, etc and like wise for the third web component (Customer_Id3, Company3, etc. When the first company is chosen, the rest of the dialogue component populates, but when the second and third Customer_Ids are chosen, the first Customer_Id dropdown updates to the first company in the customer table.

                              Any ideas on how to stop this from happening?

                              Comment

                              Working...
                              X