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

Can grid link control open a smaller window?

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

    Can grid link control open a smaller window?

    Is it possible to use the link control in a grid to open a pop up type window rather than a whole new browser window? The user would rather see the detail data on the same page. Thanks,

    Steve

    #2
    Re: Can grid link control open a smaller window?

    Javascript. Search the forum for many discussions on it.
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: Can grid link control open a smaller window?

      Steve:

      I have used Javascript in many situations. I am not clear on how to use it as part of a link control in a grid. It appears that Alpha opens a window based on what is selected in the control. I looked at the web demo example where they open detailed records on a separate page and basically copied that. If you can suggest an approach I will give it a shot. Thanks,

      Steve

      Comment


        #4
        Re: Can grid link control open a smaller window?

        Here is the approach that I use, which was shown to me by none other than Steve Wood:

        As an example, i define 2 calculated fields as such:

        psychweb_myurl = ""
        psychweb_website = "http://www.psychsite.com"

        Then, add those 2 fields to your selected fields list.

        Then, put the following code in the freeform template of psychweb_myurl:

        <a href="{Psychweb_Website}" onClick="window.open('{Psychweb_Website}', 'mywindowname', 'scrollbars=1, toolbar=1, width=900, height=600, screenX=100,screenY=75,left=200,top=25'); return false">Psychology on the Web</a>

        Finally, click "Hide row" on the second field, i.e., psychweb_website.

        You can control the width, height, etc within the code of the freeform field.

        Gary
        Gary S. Traub, Ph.D.

        Comment


          #5
          Re: Can grid link control open a smaller window?

          Thanks Gary. I will try that.

          Steve

          Comment


            #6
            Re: Can grid link control open a smaller window?

            While this seems to be relatively easy, I had a difficult time. I was able to get this to work and wanted to detail the steps for others. My objective was to be able to create a link in one grid which would open related data in another grid in a pop up window fashion. I started with the example in the web demo which shows how to create a link that opens up a new browser window or frame. (see web demo grid CustomerGridwithLink) This method however does not permit the use of a sized window (pop up). Steve Wood had posted an example of how to do this with javascript but I was having problems getting the filter to work. I found an relatively easy way to set this up.

            According to the Alpha documentation the format for a hyperlink within a grid to open an new page and filter related grid data is:

            CustomerInfo.A5w?customers_filter=customer_id='{customerID}'

            This example can be used for dbf and SQL data sources.
            The alias for the grid in this case is customers so the filter is constructed as customers_filter

            Customer_id represents a field in the datasource and {customerid} represents a field name from the grid

            You can also use a tool available in the grid to build this filter. Instead of selecting a custom control, use link control. The property for Link Address Type should be set to "Compute from fields in the grid". The link address property box contains a URL builder based on what you are filtering. When complete, it builds the URL which you can copy and paste. Change the control back to custom and continue as noted below.

            Once you construct the URL and filter you create a custom control on your grid. Insert the completed URL into the javascript code noted below (courtesy of Steve Wood and others) and place this code into the definition section of the custom control.

            When you open definition section there is some preset xbasic code. Replace the highlighted code with the javascript code below. When you publish the grid/page the link will show up in every record ( in this example the word Details will comprise the hyperlink) and will open a new pop up window based on the specifications you set in the javascript code.

            "<a href=\"javascript: void(0)\" onclick=\"window.open('CustomerInfo.A5w?customers_filter=customer_id='{customerID}'','windowname1', 'width=200, height=300'); return false;\">Details</a>"

            Comment


              #7
              Re: Can grid link control open a smaller window?

              Steve the quality of your summary of the issue was fantastic, one thing that bugs me on this forum site, is you almost never hear of what did or did not work from the various contributions as a solution to a cry for help, well done. And thanks.

              Peter
              Insanity: doing the same thing over and over again and expecting different results.
              Albert Einstein, (attributed)
              US (German-born) physicist (1879 - 1955)

              Comment


                #8
                Re: Can grid link control open a smaller window?

                Yes...I agree....thank you Steve for such a nice explanation of your solution and a good Alpha tip!

                Comment


                  #9
                  Re: Can grid link control open a smaller window?

                  Explanations/samples such as this are what I am constantly gleaning from this messageboard for my own help file--my web help file hopefully will be huge prior to my actually going over to the webside of things!

                  Thanks Steve
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment


                    #10
                    Re: Can grid link control open a smaller window?

                    This is really great stuff - Thanks for everyone's help here.

                    So I have one question - how can I show the linking ID or use a lookupc() to display other information above the grid in the new popup window?

                    That is, I am using this technique to popup a small window to enter "child records" from the main grid page. If there exist a child record, data shows up in the popup window's grid, but if there is no existing child record yet, the grid is blank (of course). I would like to pull the linking ID value, to display a lookupc() to show the associated name somewhere in the popup window.

                    I can see the linking ID value in the URL - how can I get access to this in my popup grid?

                    Thanks!

                    Comment


                      #11
                      Re: Can grid link control open a smaller window?

                      Michael,

                      When you open the popup, you are not really opening a grid, you are opening a page that contains the grid.

                      So, do the lookup in the head part of the page and display it in the body above the grid display. The value showing in the url means that it becomes a page variable in your new page so you can use it in your calculation.

                      Pat
                      Pat Bremkamp
                      MindKicks Consulting

                      Comment


                        #12
                        Re: Can grid link control open a smaller window?

                        Pat, I know I am real close but when you say to put this in the head of the page, how exactly do I reference this page variable to be displayed?

                        I have tried some xbasic and some html but no luck yet. I am sure I am missing something simple here. The page variable is Patient_ID and I can see the actual Patient_ID number listed in the url.

                        Thoughts?

                        Thanks, Mike

                        Comment


                          #13
                          Re: Can grid link control open a smaller window?

                          Well, I started out with a bit of help to Steve Bovino, but he has progressed beyond that, and to a point where I cannot get it to work, though apparently others can.

                          Here is the code I have in the definition of the custom control:

                          function Ptinfo_render as c (data as p, args as p, PageVars as p) 'do not delete this line
                          with PageVars 'do not delete this line
                          'Specify the Xbasic that returns the HTML for this control.
                          'This function must return Ptinfo_render, which should
                          'contain the HTML that will be displayed.
                          'The 'data' argument that is passed in contains the current
                          'row value for each of the fields in the Grid. For example
                          'if the Grid displays the customerid, firstname and lastname
                          'fields, you can reference the values in these fields as
                          'data.customerid, data.firstname and data.lastname

                          '-------------------------------------------------------------------
                          on error goto Ptinfo_xbasicError 'do not delete this line

                          'Write Xbasic code here that returns the HTML to be displayed by this control


                          Ptinfo_render = <<%html%
                          "<a href="\javascript: void(0)\" onclick=\"window.open('http://www.msn.com','windowname1', 'width=200, height=300'); return false;\">Details</a>"
                          %html%


                          end 'do not delete this line
                          Ptinfo_xbasicError: 'do not delete this line
                          Ptinfo_render = "Error in custom control xbasic: " + error_text_get() 'do not delete this line
                          end with 'do not delete this line
                          end function 'do not delete this line


                          This gives me the 403-Forbidden error, The security settings for this server are missing or incomplete.


                          I am trying to use this method to load another page in to the popup. Without any success there, I am trying to just load the msn.com site. The code works from an a5w page, but not here. Can anyone tell me what I am doing wrong?

                          Gary
                          Gary S. Traub, Ph.D.

                          Comment


                            #14
                            Re: Can grid link control open a smaller window?

                            I still can't get this to work. Maybe I am overlooking something simple. I am getting bleary eyed :)

                            Could someone please take a look at my code and tell me what you think the problem is?

                            Thanks ...

                            Gary
                            Gary S. Traub, Ph.D.

                            Comment


                              #15
                              Re: Can grid link control open a smaller window?

                              Gary - you don't need the <<%html% container in this instance. There is nothing special about that container, it just is one of the ways to form a block of text.

                              Here is a Custom field example that opens a smaller window and passes a variable from my grid:

                              Upload_render = "<input type=button value=\"Upload File\" onClick=\"myRef = window.open('upload_page.a5w?id="+Data.id','upload','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');myRef.focus()\">"

                              Same example passing no variables:
                              Upload_render = "<input type=button value=\"Upload File\" onClick=\"myRef = window.open('upload_page.a5w','upload','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');myRef.focus()\">"

                              Custom field is named "Upload" so replace Upoad_render with your field name.

                              Here is the Javascript referenceL: http://www.javascripter.net/faq/openinga.htm

                              Nothing is required in the <head> area of the A5W page, just the code shown here.
                              Steve Wood
                              See my profile on IADN

                              Comment

                              Working...
                              X