I'm developing a form on which i have a search button, when you push the button i want a new form to appear in which you can select items
is there any way to open an new (extra) window to do this , so that it opens on top of the first window?
PeterThis message has been edited. Last edited by: Kerry,
There are a couple of ways to do this. The first is just to create a selection form. When the user press search, do a WINFORM SHOW form and bring up a selection form. When the user makes a selection you can return to the calling form by issuing a WINFORM CLOSE form.
If you don't want a form to cover the entire screen, you can use an HTMLTable. You can create the object, and make it invisible. When the user presses SEARCH, make the object visible and place the cursor on it. When the user makes a selection, store the selection and make the object invisible.
I think the 2nd solution is something i can use.
Just to make sure : the HTMLtable is on the same form right ? just one window , one form
Sounds like you saved the day again , mark
That's correct. The HTMLTable is on the same form. But you can make it visible / invisible so it only displays when you want it.
Happy to help.
I'm interested in the original question -- is there a way to "pop up" a maintain form over top of the original? This would suit my needs perfectly.
A Maintain application can have an many forms as you want. From a displayed form, you can issue:
WINFORM SHOW FORM2
Where Form2 is the name of the second form. That displays form2 and makes it a child of form1. Form1 is still open, but "covered" by form2. When you close form2, WINFORM CLOSE FORM2 or self.WinClose(), control is passed back to Form1. Any data entered into or collected from form2 can be passed back with variable or stack.
When I issue that Winform Show it replaces the original instead of popping up.
I realize this looks like a minor quibble, but my goal is to pop up a very small window, have the user enter a date (with the dynCalendar widget) and then submit, returning the value to an html table on the original form. The original form is 1024x768 so the appearance of one field (on the second form) on such a big footprint is a bit jarring.
I, too, am interested in a good method to open a new popup window where a user could enter some data then click a Save button or a Cancel button, the popup will disappear, and the app will do something with the data entered in the edit box.
At the moment, I've created an HTML page in HTML Layout Painter with an edit box and 2 buttons, Save and Cancel. I've also created a fex with just -HTMLFORM htmlfile to call the HTML file. In my Maintain app I have a button on a form that, when clicked, calls IWCLink to execute the fex that calls the HTML page. I specify the window options in the IWCLink call so I do get the size and position that I want for my popup window.
In the HTML file I created, I named the edit box and buttons. I added a hyperlink to the Cancel button of:
and this does close my popup. So clicking Cancel does close the popup window.
I'm at the point now where I just need to figure out how to get the data entered in the edit box on the popup into a Maintain variable when the user clicks the Save button. I probably need to write an external JS function or two to accomplish this.
The reason I'm doing this is that this form is very tight on space and only 1 specific user will be using this popup window to enter additional data. I know I could just have the app go to a different form and then close that and go back to the original form but I think the popup window would be a little quicker for the user and look nicer too.
I think a popup window widget in the Form Editor would be a great addition to Maintain.
Thought I'd post an update since I was able to solve my problem just today.
First, I found out that createPopup() is an IE only JS function so I decided to forget about that. Our shop is standardized on IE *groan* but I prefer code that's as cross browser compatible as possible myself.
I guess at this point my question boils down to this -- Is there a way for a Maintain screen to pop up another Maintain screen?
It appears from my research that once the popped-up Maintain screen is closed the session is lost. That is, you can indeed pop up the screen, but you've effectively ended your session by doing so -- you can't return to the prior screen ever. Here's what I've tried:
1. Look for a CALL command in Maintain the opens into a new window. Did not find one.
2a. Winform close in a Maintain trigger ends the session.
2b. window.close() in a JS trigger ends the session.
Since I have a need to write data from a grid in this second screen the Maintain part of the equation is pretty important. Jsp or Ajax would be pretty ugly in the pop-up.
It simply appears that Maintain cannot call a Maintain in a pop-up without ending the session prior to return. You have to stay in the same window. Anyone have a solution for this?
A Maintain application can have as many forms as you want. However, if you are developing a persistant application only one form can be displayed at a time. When a parent form displays a child form you can certainly return to the parent form.
If you have: WINFORM SHOW FORM1, you can, from any case or event issue: WINFORM SHOW FORM2
From FORM2, if you issue WINFORM CLOSE FORM2 or self.WinClose(); the second form closes and you return to FORM1. Any variables or stacks populated on FORM2 are available in FORM1 as well.
The second way to do this is with the CALL command. This states that the current Maintain procedure is going to kick off another Maintain procedure and pass data between them.
In the first Maintain you could have WINFORM SHOW FORM1. Then, from any event on this form (inside a CASE) you can have CALL MAINTAIN2 From Vars / Stacks into Vars / Stacks. Then in the CALL'd Maintain you can have WINFORM SHOW any forms you want. When you want to leave THIS Maintain, just issue a GOTO END and you will be returned to the parent Maintain. Unless you closed the first form, it will STILL be displayed when you return.
I hope this helps.
I'm talking two separate windows on the operating system -- a parent window that has a pop-up appear over top of it. Is that possible? Your first paragraph seems to be a pretty solid "no" but then you go into some detail after that.
If you are talking about two explorer browers, both containing Maintain applications, then no. You can't do that.
You can either have multiple Maintain Winforms (one displayed at a time) and pass data between them OR use a Weblink to kick off a non-Maintain procedure like a Table or a URL.
So I gave up trying to get it in front and followed the 'visible/invisible' technique discussed earlier in this post. I now display the result of what should have been in the new window in a html object in a bit of empty space on the maintain form.
Mark and GamP are right, this is due to the Maintain session cookie.
With the same session you can have as many windows or Iframes or Frames running the same maintain session you want, depending on resources, but this only works for non-persistent calls.
|Powered by Social Strata|