Focal Point
[SOLVED] 4.3 Maintain in 7.6

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7521036192

July 15, 2008, 10:59 AM
Håkan
[SOLVED] 4.3 Maintain in 7.6
I've got a Maintain app (or rather 25) developed in 4.3. Now we're taking them to 7.6 and the app loads fine using the servlet, but, when clicking on the Exit button which triggers the command self.winexit(), Tomcat returns a HTTP 404 page, saying that /ibi_cgi/ibiweb.exe is not available. Do I have to set up a 4.3 environment again and migrate all the apps?

Tia
Håkan

This message has been edited. Last edited by: Kerry,


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
July 15, 2008, 11:25 AM
Maintain Wizard
You do not need V4 in order to migrate your Maintain applications to V7. When you open V7 it should detect the old CTA files and ask you if you wish to migrate the application. If for some reason this didn't happen, you can trigger it from:
Programs -> Information Builders -> WebFOCUS Developer Studio -> WebFOCUS Developer Studio Utilities -> Project Migration tool.

You MAY need to check to make sure you don't have any hard coded CGI commands in the applications though.

Mark
July 23, 2008, 08:34 AM
Håkan
Finally I've got the migration to work. I had to find a 4.3.6 installation in order to generate the .GFA file. Now, I've got a problem closing the app. I've opened the maintain app in a new window, and when clicking the exit button the browser just sits there. I can close the window by clicking on the 'X'. The code executed is:

function OnButton2_Click ( ) {
IWCTrigger("WINEXIT");
window.close
}

Any ideas?

Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
July 24, 2008, 03:49 AM
GamP
Hakan,

The actual correct syntax should be:
window.close();
It really needs the opening and closing brackets, and I'd put in the ; too.
Most probably, you now see a little warning sign at the left hand side of the browser status line, indicating a javascript error. That is because the () is missing, and thus the close command is not being exxecuted.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 24, 2008, 05:51 AM
Håkan
Gerard,

thanx. I was actually just pasting the code from the IB Tech Support Site. I did'nt get any error from the browser. Btw, is there a way of preventing IE from prompting when you're closing the window?

Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
July 24, 2008, 05:58 AM
GamP
There are two possible warnings when closing a window with a maintain application active in it.
The first one comes from maintain itself and says something like 'The application has been disconnected from the server' or words to that effect. This warning can be prevented by placing a statement in the edasprof: MNTCON EXIT_WARNING OFF.
The other one is a warning from IE (something like asking if it is OK to close the window) and occurs when the window that is being closed is not opened by a parent window. This is the case for instance when running your maintain from within the cde environment. There is no way that I know of to circumvent this message.
Which is why I always use a parent window to open up a maintain window. That way I never get the warning.

Hope this helps ...

This message has been edited. Last edited by: GamP,


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 25, 2008, 08:38 AM
Diptesh Patel
Håkan
Oner way to avoid the message from IE (prompting when closing the window is to change the opener of your window to itself. IE allows a window to be closed (without prompting) if a parent window had opened it, or if the window is trying to close itself. I use the following try...catch to achieve that.

try{
if(window.opener != self){
window.opener.closeme();
window.opener=self;
}

}catch(e){}


This JavaScript would go into the window that is to be closed.
Hope that helps.

Diptesh


Diptesh
WF 7.1.7 - AIX, MVS
July 28, 2008, 01:45 AM
Håkan
Diptesh

this still fails. The code bringing up the mnt pgm goes like this:

-HTMLFORM BEGIN
  
<html>
<head>  
<script language="Javascript">
function auto() {
document.loadform.target="_blank";
document.loadform.submit();
window.history.go(-1);
}
</script>
</head>
<body onLoad="auto[);">
<form name="loadform" method="get" action="/ibi_apps/WFServlet">
<input type=hidden name="IBIF_cmd" value="!IBI.AMP.EX2;">
<input type=hidden name="IBIAPP_app" value="Raptor_6">
<input type=hidden name="IBIS_passthru" value="on">
<input type=hidden name="IBIS_connect" value="on">
</form>
</body>
</html>

-HTMLFORM END

and the code trying to close the mnt window without being prompted comes here:

function OnButton3_Click ( ) {
window.opener=self;
self.close();
}

I still get that annoying question from IE. I suppose I could get the users stick to clicking on the X in the top right corner, but it would be nice to be able to do it thru a button.

Rgds
Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
July 28, 2008, 09:12 AM
Diptesh Patel
Håkan:
Maybe I was not really clear. Your script should be:
function OnButton3_Click ( ) {
window.opener=self;
window.close();
}

Not self.close


Check out this site:
http://blogs.x2line.com/al/articles/350.aspx
As long as window.opener is not an empty string, you will get the message.

Diptesh


Diptesh
WF 7.1.7 - AIX, MVS
April 03, 2009, 01:40 PM
Mighty Max
Tried your solution to Exit a Maintain Application with a button click event.
It did not work in IE7.

Here is a solution I found for reference.
Close Window in IE from javascript. (Small Hack)
This will exit the application and close the browser window without be prompted in IE7.

  
function OnExitButton_Click ( )  {
IWCTrigger("WINEXIT");
var self = window.open("", '_self');
self.focus();
self.opener = self;
self.close();
}



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files