ID: 31493
Updated by: [EMAIL PROTECTED]
Reported By: csaba at alum dot mit dot edu
-Status: Open
+Status: Bogus
Bug Type: COM related
Operating System: Win XP Pro
PHP Version: 5.0.3
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2005-01-11 16:58:26] csaba at alum dot mit dot edu
Description:
------------
If I do
$ie = new COM("InternetExplorer.Application");
$nav = "javascript:alert('hi mom');";
$ie->Navigate($nav);
IE vanishes, but fast
Note, this is run using PHP.exe (CLI) from a CMD box
on a Win XP Pro SP2 machine with IE 6
Thanks,
Csaba Gabor from Vienna
Reproduce code:
---------------
<?php
$ie = new COM("InternetExplorer.Application");
$ie->Visible = true;
$nav = "javascript:document.open();document.write('<body
onload=\"alert(\\'Ready\\')\">Hi mom</body>');document.close();";
print "$nav\n";
sleep(3);
$ie->Navigate($nav);
sleep(5);
print "finished!\n";
?>
Expected result:
----------------
I expect to see a browser which displays a 'Ready' alert box and 'Hi
Mom' in the browser window.
Actual result:
--------------
As soon as the $ie->Navigate is called, the bell clinks and IE is gone.
The PHP program continues to run without error.
It doesn't seem to matter what is after the javascript:
It could be as simple as
$nav = "javascript:alert('hi mom');";
or you could get rid of the onload part from $nav in the example I
supplied.
By the way, you can see that IE accepts $nav directly just fine (but
get rid of the backslashes except one each before the inner single
quotes, and of course remove the first " and the trailing "; - In
other words, use what is printed to the CMD screen) by manually copying
it in to the location bar and pressing enter yourself.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31493&edit=1