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

Applying F12 (in chrome) or firebug parts of the code. Container title

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

    Applying F12 (in chrome) or firebug parts of the code. Container title

    Hi.

    I have the following excerpt from F12 in Chrome during a run of html page, written in Alpha Anywhere, v4.2 .
    How do I use the various properties (in this case of the container), in this json-like structure?
    Both to read some of the values and to write (define them), ex ....body.scroll.axis = 'x'; in Alpha's javascript.

    --------------------------------------------------------
    ....................
    ....................
    DLG1_DlgObj.createWindow('DLG1_CONTAINERWINDOW_CONTAINER_7','modal',
    {
    body: {
    content: {
    type: 'element',
    elementId: 'DLG1.V.R1.CONTAINER_7'
    },
    scroll: {
    axis: 'y',
    stopPropogation: false,
    pull: {
    y: 'auto',
    x: 'auto'
    },
    indicator: {
    show: true,
    h: {
    show: true,
    location: 'right',
    offset: '0px',
    left: '0px',
    right: '0px'
    },
    v: {
    show: true,
    location: 'right',
    offset: '0px',
    top: '0px',
    bottom: '0px'
    }
    }
    },
    style: 'overflow: auto; '
    },
    height: 'max:250px',
    width: '100%',
    title: {
    html: 'ABCDEF',
    show: true,
    location: 'top',
    direction: 'ltr'
    },
    disableMove: true,
    theme: 'iOS:base'
    }
    );
    ....................
    ....................
    ===============================================
    Specifically, I want to change the title of the window container with a javascript code. It can be specified (hardcoded) in the Window property,
    and it can be a value of a field in a list, through a placeholder with curly brackets. But can I just specify it as a random value in a code?
    I guess the broader question is how do I use the code above from the html source-code, or F12 in Chrome, firebug in Firefox.

    I tried different combinations, like the ones below - no luck :

    // var m1 = {dialog.object}.getPointer('CONTAINER_7');
    // document.getElementById('DLG1.V.R1.CONTAINER_7').title.html = 'abc1'; //innerHTML too
    ///$(cont7).title = 'abc2';
    ///cont7.height = 'max:10px';
    //var currWindow = DLG1_DlgObj.getWindow('DLG1_CONTAINERWINDOW_CONTAINER_7');
    //currWindow.name = 'abc3';

    Thanks!

    #2
    Re: Applying F12 (in chrome) or firebug parts of the code. Container title

    I can't decipher what you want to do from your post. Can you provide a sample UX and show what you want to change?

    Comment


      #3
      Re: Applying F12 (in chrome) or firebug parts of the code. Container title

      David,
      Thanks for the reply.
      In this UX, I'd like the title of the window container to change to ABC1 or ABC2, accordingly to the button we've clicked on.
      Attached Files

      Comment


        #4
        Re: Applying F12 (in chrome) or firebug parts of the code. Container title

        Have a look at the Container Window properties. The "Window name" property has the answers you want. If you give the Window name a unique name, then you can get that window object and then use methods on it. One of the methods is .setTitle(). Click the "smart field" button on the Window name property for details.

        One item missing from the doc is that the window name must be uppercase. Otherwise the whole thing blows up. Also, in order to ensure the window name is unique, add {Alias} as a prefix. This is also described in the Window name details.

        test_window_title.a5wcmp

        Comment


          #5
          Re: Applying F12 (in chrome) or firebug parts of the code. Container title

          Thanks David - that did the trick! I missed the setTitle method. The uppercase and {Alias} addition seem to be a must and great habit too.

          On another note (and here I start being incoherent):
          Is there any general rule that I can use the references to objects and their properties/methods seen in the view-source of the running html A5 page?
          Something in the lines of, for example in this test component:
          var m1 = {dialog.object}.getPointer('CONTAINER_7');
          $document.getElementById('DLG1.V.R1.CONTAINER_7').title.html = 'abc1';
          Seen on the 3view_source_otherproperties_2of2.JPG snapshot.

          I'm not sure about the syntax. Also, can that be generalized beyond the WINDOW object ... getting a handle on any element and setting its properties by looking at the json-like structure of the shown view-source page?

          Thanks again!
          Sime

          PS a special thanks for helping out a fellow human being with this at 1:16am! Q: when does David sleep? :)
          Btw, is my time on the clock wrong for the forum, or it's a global thing? On the thread messages timestamp, it says PM instead of AM, and vice-versa.

          1preview_browser.JPG
          2view_source_setTitle.JPG
          3view_source_otherproperties_1of2.JPG
          3view_source_otherproperties_2of2.JPG

          Comment


            #6
            Re: Applying F12 (in chrome) or firebug parts of the code. Container title

            I think the answer is no... but I'm not sure I understand the question. The code you're seeing as rendered is created internally by Alpha. You can often get at rendered object by a few different methods, but usually this is not necessary. In the case of a "pop-up" window, as in the Container, you pretty much must use the available methods since Alpha uses a kind of bizarre A5dlg0 id... where 0 changes number depending on what's being popped up... which means you never can really count on the id and using it yourself.

            You can convert Actions into code and have a look at what's available... but again... I'm not sure there is always a good reason to do so.

            Comment


              #7
              Re: Applying F12 (in chrome) or firebug parts of the code. Container title

              Thanks David - it makes sense now, especially with the proprietary of A5dlg0. I guess I was looking for the non-existent "one covers it all" approach to look for hidden properties of elements, that I can find them in the rendered html and use them (back) in the Alpha design/coding.
              The method you told me about: setTitle, along with the Window name, got this particular detail resolved for me.
              Have a great day!

              Originally posted by Davidk View Post

              I think the answer is no... but I'm not sure I understand the question. The code you're seeing as rendered is created internally by Alpha. You can often get at rendered object by a few different methods, but usually this is not necessary. In the case of a "pop-up" window, as in the Container, you pretty much must use the available methods since Alpha uses a kind of bizarre A5dlg0 id... where 0 changes number depending on what's being popped up... which means you never can really count on the id and using it yourself.

              You can convert Actions into code and have a look at what's available... but again... I'm not sure there is always a good reason to do so.

              Comment

              Working...
              X