ID:               31493
 User updated by:  csaba at alum dot mit dot edu
 Reported By:      csaba at alum dot mit dot edu
 Status:           Bogus
 Bug Type:         COM related
 Operating System: Win XP Pro
 PHP Version:      5.0.3
 New Comment:

It was certainly not my intention to submit a duplicate bug report -
that's a waste of everyone's time.  Before starting my writeup, I
searched for a similar report, but didn't find one.  When I pressed the
submit button upon finishing my writeup, PHP searched, but did not find
one.  And now once again I have searched (scanned about 130
"javascript:" and Navigate reports) but still did not see it.

It would be very nice if you would post a link to the report that you
reference.

Thanks,
Csaba Gabor


Previous Comments:
------------------------------------------------------------------------

[2005-01-11 18:16:12] [EMAIL PROTECTED]

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.

.

------------------------------------------------------------------------

[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

Reply via email to