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

Js read/write checkbox values and onchange event problem

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

    Js read/write checkbox values and onchange event problem

    Hi,

    I am populating a dialog with java script. For Example I set a checkbox value to true and see it checked in the Working and Live Preview but when I read the value "false" is returned

    Code:
    				{dialog.Object}.setValue('Checkbox1',true);
    				var thishere = {dialog.Object}.getValue('Checkbox1');
    				 alert(thishere);
    furthermore I tried to call the onChange Event as the dialog did not act on the checkbox being selected nor did the total values calculate.
    calling
    Code:
    {dialog.object}.prepare();
    at least let the total value calculate.
    But how can I call the onChange() Event of a control out of JavaScript?
    I tried
    Code:
    document.getElementById('DLG1.V.R1.Checkbox1').onchange();
    but it does not fire. and it does not complain either. It seems not to think it did not changed at all.
    so what am I doing wrong, I believe it is something very simple and I just missed it.

    Thank you for your help!

    #2
    Re: Js read/write checkbox values and onchange event problem

    It looks like there is a problem with the dialog control. Using the onInitializeComplete event (is that what you're using?) to set the Checkbox, the control is visibly being set but the control value is not set and the dialog is not put into a dirty state, as it should be, and as the in-line documentation states for the setValue method.

    If you were to put your setValue code into another control, on it's double-click event, for example, the control would be properly set and the dialog would be dirty. I would suggest you report this one.

    Comment


      #3
      Re: Js read/write checkbox values and onchange event problem

      Thank you David for your feedback! I will report this one as an bug and will let you now as soon as there is a solution.

      Comment


        #4
        Re: Js read/write checkbox values and onchange event problem

        Originally posted by Davidk View Post
        It looks like there is a problem with the dialog control. Using the onInitializeComplete event (is that what you're using?) to set the Checkbox, the control is visibly being set but the control value is not set and the dialog is not put into a dirty state, as it should be, and as the in-line documentation states for the setValue method.

        If you were to put your setValue code into another control, on it's double-click event, for example, the control would be properly set and the dialog would be dirty. I would suggest you report this one.
        Actually, it is not a bug.

        If you examine the generated HTML for the dialog, you will see code like this toward the end:


        Code:
        DLG1_DlgObj._executeEvent('onInitializeComplete');
        var dataObj = {
        	name: 'smith'
        };
        
        DLG1_DlgObj.populate(dataObj);
        DLG1_DlgObj._fireWatches(1);
        so, the .populate() is firing as the last thing (after the onInitializeComplete) and it is setting the dialog to clean.

        We could add a new client side event (say - 'afterDialogPopulate' that fired as the very last thing on the page, or you could wrap your code in the OnInitializeComplete in a setTimeout().

        for example:

        Code:
        setTimeout(function() {{dialog.Object}.setValue('married',true);},100)

        Comment


          #5
          Re: Js read/write checkbox values and onchange event problem

          Thanks for that Selwyn... I would vote for the afterDialogPopulate event... would be really handy.

          Comment


            #6
            Re: Js read/write checkbox values and onchange event problem

            Thanks a million Selwyn!
            That timeout workaround did the trick and I can get on with my work.
            An afterDialogPopulate Event of course would be nice, but the workaround works fine for now.
            Thanks again for your fast response.

            Comment


              #7
              Re: Js read/write checkbox values and onchange event problem

              ok, done.

              we have added new onRenderComplete event in the Dialog component.

              it is the very last thing that gets fired on the dialog. this will be in the next update.

              Comment


                #8
                Re: Js read/write checkbox values and onchange event problem

                Gotta say, Selwyn... you and this software are amazing. Where else and who else would ever do this. Thanks so much. David

                Comment


                  #9
                  Re: Js read/write checkbox values and onchange event problem

                  David Kates
                  I am sure Selwyn will be delighted when he sees your reply.

                  Btw what kind of app are you building?
                  Regards
                  Richard
                  Richard Rabins
                  Co Chairman
                  Alpha Software

                  Comment

                  Working...
                  X