From: K2G on
HI,
I am running into a problem where my application is crashing in
running javascript.


my window uses IE OCX controls to do some processing from web.
At the end of the processing i have a button "Finish"
when i click Finish, it is supposed to close the OCX and the window it
is residing in.
for that my function is

function CloseWindow()
{
window.external.close();
window.close();
}

But this is crashing. Can someone please help me.
What will happen if i call only window.external.close() only.

Thanks
Keshav

From: Thomas 'PointedEars' Lahn on
K2G wrote:

> my window uses IE OCX controls to do some processing from web.

Be more specific. Which control?

> At the end of the processing i have a button "Finish"
> when i click Finish, it is supposed to close the OCX and the window it
> is residing in.
> for that my function is
>
> function CloseWindow()
> {
> window.external.close();
> window.close();
> }
>
> But this is crashing.

No, it is not. most certainly there is a TypeError runtime error instead
as

typeof window.external.close === "undefined"

(needs to be "function", "object", or "unknown" to be callable).

> Can someone please help me.

<http://msdn.microsoft.com/en-us/library/ms535246%28VS.85%29.aspx>

I don't see a close() method there. Do you?

> What will happen if i call only window.external.close() only.

Is that a question? If yes, why don't you just try it?
I guess it will "crash", too.

<http://jibbering.com/faq/#posting> pp.
<http://www.catb.org/~esr/faqs/smart-questions.html>


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)