on 12-21-2006 11:53 AM
Dear All,
I tried to close the iView when user clicks the "exit" button on my WD program.
Below is how I achieve...
1. In your component's interface view, create an exit plug. Name it as - ExitPlug.It's type as "Exit".
2. Create a paramater for this exit plug. Name this parameter "Url". It should be exactly like the same name.
3. In your view add the interface view as a required controller.
4. Create your HTML file. Let's say you call it Static.html.
<html>
<head>
<script langauage="javascript">
function closeWin(){ window.close();
}
</script>\
</head>
<body onUnload="javascript:closeWin()"> </body></html>
5. Save this in the mimes folder for your DC under your package. You do this from the navigator view.
6. in the view with IFrame UI element, wdDoInit(), use WDURLGenerator.getAbsoluteWebResourceURL to get the Static.html
Now,<b> the problem is that the Static.html page is successfully shown when user clicks the "exit" button, but Static.html page stays there without being closed.</b>
What I may do wrongly in my javascript??
I tried couple of combindations, but none of them is working
parent.close()
parent.parent.close()
thanks for any input.
Zita
Hi Zita,
Try this once in javascript:
var currWindow = window.top;
currWindow.opener = window.top;
currWindow.close();
Regards, Suresh KB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.