Click to See Complete Forum and Search --> : mysterious close window problem


splendidbob
08-11-2003, 01:20 PM
Hi folks, this has been baffling me for a while now, I have a (what should be) simple problem to solve. My HTML page opens a popup window via a form button, the user then can click another button and this window will close. V simple, should work, but i get an error in ie and it doesnt close. Heres the code:


<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE=javascript>
<!--
var swindow;

function winmess()
{
swindow = window.open('message.html', 'smallWindow', 'width=200,height=200');
}

function winclose()
{
if(swindow)
{
swindow.close();
}
}

//-->
</SCRIPT>


</HEAD>
<BODY>
<INPUT type="button" value="Open" id=button1 name=button1 onClick=winmess()>
<INPUT type="button" value="Close" id=button2 name=button2 onClick = winclose()>
</BODY>
</HTML>


So, (since i see nothing wrong with this code) does anybody have any suggestions as to why it doesnt work on my comp?

thanks in advance
Bob

http://www.luminate.org.uk

pyro
08-11-2003, 01:33 PM
It worked for me. What is the error message you are getting?

splendidbob
08-11-2003, 03:34 PM
Hi, thanks for replying..

the error message i recieved was:

"Incompatible version of the RPC stub"

any ideas what this could mean??

Bob

http://www.luminate.org.uk

pyro
08-11-2003, 03:36 PM
Never heard of an error like that before... What version of IE was that?

splendidbob
08-11-2003, 03:49 PM
hi,
IE6..

but i seem to have solved the problem now. Did some hunting around for
"Incompatible version of the RPC stub"

and it turns out that the file: dispex.dll was faulty in my windows/system directory. I replaced this and the window now closes properly.

blimey, wasted a day on this ;) - this is the first time in several years of debugging various languages where it actually was something wrong with my comp (as opposed to it normally being some stupid error on my part :D)

anyway, thx again for trying..

bob

http://www.luminate.org.uk

pyro
08-11-2003, 03:50 PM
Glad you got it sorted out... :)