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

Close Pop-up AJAX Window/Overlay

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

    Close Pop-up AJAX Window/Overlay

    I can't figure out how to close a Pop-up Ajax Window/Overlay. Usually I have no problem with these, but this one's stubborn.

    From a UX component, I have a button that loads the contents of a container into a Modeless-Popup window. I also give that window the name __EMAIL.

    So, I added a Close button to the Container so it'll be on the popup. I've tried everything -- here's just a cut/paste from my editor to illustrate:

    Code:
    //var wObj = {Dialog.Object}.getWindow('__EMAIL');
    //var wObj = {Dialog.Object}.getWindow('A5dlg0');
    
    //var ele = $('__EMAIL');
    
    //{dialog.Object}.closeContainerWindow(this);
    var ele = $('__EMAIL');
    {dialog.Object}.closeWindow(ele);
    
    //alert(wObj);
    //ele.hide();
    
    //var ele = $('__EMAIL');
    //{dialog.object}.closeContainerWindow(ele);
    None of this, in any combination works. Using Firefox, I can't even find anything with a name or ID of __EMAIL so that has me wondering. I've tried using A5dlg0 which seems to maybe be the "real" window ID, but no joy.

    Any suggestions welcome.
    -Steve
    sigpic

    #2
    Re: Close Pop-up AJAX Window/Overlay

    Steve,

    I've added a button my to my UX and in the Click event I'm running the Action Javascript to "Open a Pop-up Ajax Window/Overlay". In this Action's properties I've set a Window Name of __EMAIL, set it to modeless-popup and turned off the "window title has close button".

    My container is a simple "CONTAINER" sub-type of none.

    I added a button to this container and called the Action Javascript "Hide/Close a Window". The Window Name I entered as __EMAIL. There is no dropdown value available here because the window doesn't actually exist... yet.
    This works.

    The converted code for the close window action is the following... and it works as well.

    var win = {dialog.object}.getWindow('__EMAIL');
    if(win) win.hide();

    Are you opening the UX inside something else?

    Hope this helps.

    Comment


      #3
      Re: Close Pop-up AJAX Window/Overlay

      Yup, you've matched what I've done David. The UX is in the pagetop.a5w, that gets included with all other pages. There are other objects on the page, but none with a name or id of __EMAIL.

      Edit: just ran it with Firebug, found this error msg in the console when I load the container to a window:

      Code:
      TypeError: A5.windows._w[("" + arguments[0])] is undefined
      ...[0]]._winChain;for(var prop in A5.windows._w){if(!A5.windows._w[prop].hidden){if...
      Edit #2: Even when I put a "Window title has close button" on the popup, I get the button, but it does nothing.

      Edit #3: I checked the box for "Has custom toolbar buttons" and added a Close button. Name is "Close", label is "Close", Action is "Close". It is not disabled. And yet it does nothing at all.

      Never had so much trouble getting a window to close.
      Last edited by Steve Workings; 08-27-2013, 02:19 PM.
      -Steve
      sigpic

      Comment


        #4
        Re: Close Pop-up AJAX Window/Overlay

        I just looked at the javascript that produces the popup. I wonder if the references to {grid.style} and {grid.object} are a problem here:

        Code:
        var windowName = '__EMAIL';
        {Grid.object}.createWindow(windowName,'modeless-resizable',
        	{
        	body: {
        		content: {
        			type: 'element',
        			elementId: '{dialog.componentname}.V.R1.CONTAINER_1'
        		}
        	},
        	height: '',
        	width: '',
        	title: {
        		html: 'Send us a Note',
        		show: true,
        		location: 'top'
        	},
        	disableMove: false,
        	theme: '{grid.style}'
        }
        	);
        
        
        window['{grid.componentName}_O_2AF7D5B9F0E14FB19BA4D4D23D5E3778'] = function(objEle) {
        	var windowName = '__EMAIL';
        	var currWindow = {Grid.object}.getWindow(windowName);
        	currWindow.show('flyout-bottom',objEle);
        	
        	}
        -Steve
        sigpic

        Comment


          #5
          Re: Close Pop-up AJAX Window/Overlay

          Steve, I just looked at one of mine and it has {grid.style} and {grid.object} reference, and it works.

          The only other thing I can think of is if for some reason it is rendering inside of an iframe. I have had a fight with that already, acting just like you describe.
          - Dan Hooley
          - Custom Desktop or Web database development -

          Comment


            #6
            Re: Close Pop-up AJAX Window/Overlay

            Yeah, Dan, this works fine on my development system. I'm putting up a new site, and it has a few really difficult little bugs like this.

            I switched gears, took another approach. I moved the Container to it's own UX, used the "pop up a UX in modal window" instead. Another bunch of arguing with A5, and finally got THAT window to close using the method here:

            http://www.screencast.com/users/Alph...b-d94ffa128d63
            -Steve
            sigpic

            Comment


              #7
              Re: Close Pop-up AJAX Window/Overlay

              var ele = window.parent.document.getElementById('__EMAIL');
              var winObj = window.parent.A5.windows.getFromElement(ele);
              winObj.hide();
              Frank

              Tell me and I'll forget; show me and I may remember; involve me and I'll understand

              Comment


                #8
                Re: Close Pop-up AJAX Window/Overlay

                Thanks Frank - as I noted, I changed gears, did it a different way and can't test this now. I'll probably avoid the method of putting a container into a popup window -- don't want to fool again with whatever I was missing. Even the windowbar close button didn't respond.
                -Steve
                sigpic

                Comment

                Working...
                X