I am using the:
Application.ExternalEval(“window.open(‘http://www.abc.com’)”);
… command to open lots of web pages from my world.
My question is:
Is there a such thing as Application.ExternalEval ("window.close… or something like it to close opened windows to neaten things up? I have taken a few stabs at it and I can seem to come up with anything to close the open windows.
Here is a little more information and I think it narrow down what needs to happen. (This is a sample script I found on a site for web page development):
<SCRIPT language="JavaScript1.2">
function popuponclick()
{
my_window = window.open("",
"mywindow","status=1,width=350,height=150");
my_window.document.write('<H1>The Popup Window</H1>');
}
function closepopup()
{
if(false == my_window.closed)
{
my_window.close ();
}
else
{
alert('Window already closed!');
}
}
</SCRIPT>
So I see that they define the page to be closed with a “my_window = window.open” statement.
But in Unity I can say “my_window = Application.ExternalEval(window.open)…” so how do I define the open window?
Then I ‘think’ I would code: Application.ExternalEval ("window.close(“my_window”);