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

Question on AJAX Popup Windows

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

    Question on AJAX Popup Windows

    Okie dokie, I tried to do the nice thing and first figure this out myself, then I searched Google (limited to alphasoftware.com), then I searched the forum and I found three useful pages related to what I'm looking to do. Thread: want AJAX popup from non-Grid, Wiki: Setting Pop-up Ajax Window Size, and Thread: Sizing a Popup Window .

    I'll get this out of the way now. Originally, I was using a Link with the Target set to be an AJAX Window. However, I am switching to buttons because I could not figure out how to get to the JavaScript events as described in the above links. I have no preference for whether I use links of buttons, but I think buttons will be a little easier. Now onto what I am trying to do.

    My goal is to have my AJAX popup window resize itself to fit its contents. In the onClick event of my button I have Action JavaScript that opens an AJAX Window. Everything works just fine with it, except the size. I have set the Window height and Window width properties to blank as their descriptions say doing so causes the window to resize automatically to the contents. Yet this is not happening (anyone know why?).

    So after reading the above pages, now I want to use the onShow event of my AJAX popup to figure out and set the size myself. Not being overly familiar with Alpha Five or AJAX I'm struggling here. Does anyone know how I can find the widest and lowest elements in my window? By widest and lowest I mean relative to the top-left of the window. Basically I am trying to find a way to figure out what the width and height of the window would be if it had automatically resized so that I can resize it myself.

    I sure hope that I described that well. Any guidance would be much appreciated.

    #2
    Re: Question on AJAX Popup Windows

    I've been looking at this on and off today and, apart from the Window height and width not working when set to blank, I can't quite get there.

    The problem is that in order to resize the window we need to know what to resize it to based on what's in the window... and we don't know what's in the window until it's displayed.
    onShow fires too early and there isn't another event, that I can see, that will fire after the window is displayed.

    The following code gets the "table" size, which is what we need, but only after the window is rendered.

    Code:
    viewportwidth = document.getElementsByTagName('table')[0].clientWidth;
    alert('on show ' + viewportwidth);
    When this code is executed from any of the events it returns the first table size from the calling window.

    When the code is executed from a button in the pop-up window it returns the table info from the pop-up - which is what we need. It's a chicken and egg thing.

    Any ideas?

    David

    Comment


      #3
      Re: Question on AJAX Popup Windows

      What are you putting in the popup an a5w page or a grid?
      Insanity: doing the same thing over and over again and expecting different results.
      Albert Einstein, (attributed)
      US (German-born) physicist (1879 - 1955)

      Comment


        #4
        Re: Question on AJAX Popup Windows

        An a5w page containing a grid.

        I've also tried putting the code from http://wiki.alphasoftware.com/Settin...dow+Size+V10.5 into the grid but realized that "this" in the code refers to the "owner" object. In the case of the popup using onShow will refer to the window but used in a grid will refer to the grid and so doesn't have the same methods or functions.

        Comment


          #5
          Re: Question on AJAX Popup Windows

          that's the problem, unless you have a specific reason for having the a5w then you should link directly to the grid, remove all size settings and it will display perfectly every time.
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment


            #6
            Re: Question on AJAX Popup Windows

            Yikes... thanks Pete... that's was it. I have to say this is what drives me nuts sometimes about A5... it's just simply misleading at times. The attached says leaving the size settings blank will resize the grid. After I'd selected the Javascript Action to display a page I just went with that. I didn't realize I could have made the choice to select a grid, not a page.

            Excellent Pete... very much appreciated.
            Attached Files

            Comment


              #7
              Re: Question on AJAX Popup Windows

              Sorry that I'm so late to come back to my own thread.

              Well, thank you guys a whole bunch! That really clears that up. The reason I had it open an a5w page in the popup is because I used the URL to specify a filter. Now I just added a Base Filter to the grid and it works great.

              You guys are a pack of life savers!

              Comment


                #8
                Re: Question on AJAX Popup Windows

                I am having the same problem - however I NEED to have the ajax pop-up containing an A5W page - reason being it contains several different related grids. The weird thing is - Google Chrome and Firefox open the ajax windows perfectly - IE8, IE9 open the ajax window the ENTIRE width of the screen and it looks very messy. Any ideas why ONLY IE gives this problem?

                Comment


                  #9
                  Re: Question on AJAX Popup Windows

                  Originally posted by eswindhauser View Post
                  I am having the same problem - however I NEED to have the ajax pop-up containing an A5W page - reason being it contains several different related grids. The weird thing is - Google Chrome and Firefox open the ajax windows perfectly - IE8, IE9 open the ajax window the ENTIRE width of the screen and it looks very messy. Any ideas why ONLY IE gives this problem?
                  Were you ever able to solve the problem with IE8 opening the ajax window the ENTIRE width of the screen?
                  This is happening with only one of my popup windows with IE8 only. I have been developing and testing with IE9, only to realize now at the end that the popup has a problem with IE8. All other browsers are behaving well.

                  Anybody else had and resolved this issue?

                  I'm on V11, but the whole popup stuff seem to have remained untouched from v10.

                  Thanks,
                  Richard
                  Richard
                  --------------------------------------------------------
                  Find the Good and Praise It
                  Alex Haley

                  Comment


                    #10
                    Re: Question on AJAX Popup Windows

                    Originally posted by eswindhauser View Post
                    I am having the same problem - however I NEED to have the ajax pop-up containing an A5W page - reason being it contains several different related grids. The weird thing is - Google Chrome and Firefox open the ajax windows perfectly - IE8, IE9 open the ajax window the ENTIRE width of the screen and it looks very messy. Any ideas why ONLY IE gives this problem?
                    I don't know if this is the only solution, but search for a META tag or HTML that will force IE to run in "Compatibility Mode" for the page that has your popup. Fixes it for me.

                    Actually, before you try that, try changing your Doctype to:

                    <!DOCTYPE html>

                    I cannot remember if it was that or Compatibility Mode that fixed it.
                    Steve Wood
                    See my profile on IADN

                    Comment


                      #11
                      Re: Question on AJAX Popup Windows

                      Put this in the first line of your a5w page.
                      <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd">
                      Insanity: doing the same thing over and over again and expecting different results.
                      Albert Einstein, (attributed)
                      US (German-born) physicist (1879 - 1955)

                      Comment


                        #12
                        Re: Question on AJAX Popup Windows

                        Also read this thread. http://msgboard.alphasoftware.com/al...pe+html+public
                        Insanity: doing the same thing over and over again and expecting different results.
                        Albert Einstein, (attributed)
                        US (German-born) physicist (1879 - 1955)

                        Comment


                          #13
                          Re: Question on AJAX Popup Windows

                          Hi Peter,
                          I want to open a specific grid in popup window from link or button in a5w page,

                          Please any help or helpful links or videos...
                          Thanks in advance :)
                          Best Regards,
                          Kamel Jazmati

                          [email protected]
                          Kamelj.com
                          @KamelZJ

                          Comment


                            #14
                            Re: Question on AJAX Popup Windows

                            Originally posted by peteconway View Post
                            What are you putting in the popup an a5w page or a grid?
                            Hi Peter,
                            I want to open a specific grid in popup window from link or button in a5w page,

                            Please any help or helpful links or videos...
                            Thanks in advance :)
                            Best Regards,
                            Kamel Jazmati

                            [email protected]
                            Kamelj.com
                            @KamelZJ

                            Comment

                            Working...
                            X