#20674 [Opn->Bgs]: extra quotes added to page
| From: | jan@php.net | Date: | Wed, 27 Nov 2002 14:24:07 +0000 |
| Subject: | #20674 [Opn->Bgs]: extra quotes added to page | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-25962@lists.php.net to get a copy of this message | ||
ID: 20674
Updated by: jan@php.net
Reported By: tom.schnittker@rexhealth.com
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Linux 7.2
PHP Version: 4.2.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
you don't write standard conform HTML, that might confuse the trans-sid
parser. try:
<?
session_start();
echo <<< EOT
<input type="button" value="View Report"
onClick="window.open('./report1.php','_top')" style="width:
200">
EOT;
?>
Previous Comments:
------------------------------------------------------------------------
[2002-11-27 08:16:05] tom.schnittker@rexhealth.com
I have the following line of code in a script:
echo "<input type=button value='View Report'
onClick=window.open('./report1.php','_top') style='width:
200'>";
Which worked just fine. I then added a session_register statement to
the script:
<?
session_start();
echo "<input type=button value='View Report'
onClick=window.open('./report1.php','_top') style='width:
200'>";
?>
The problem was that after this when the script processes for the first
time the generated source code becomes:
<?
session_start();
echo "<input type=button value='View Report'
onClick="window.open("'./report1.php','_top') style='width:
200'>";
?>
Note the spurious set of quotes around window.open(. These quotes make
the button inoperative. If I do a refresh, the quotes disappear and it
works fine. I've made sure the browser cache is clear so I know that
isn't the problem. I've replicated the problem multiple times.
The problem could be browser related but if the same source is being
sent each time from the Apache server, I'm not sure why the browser
would interpret it differently on the initial load of the page as
opposed to following a refresh. Considering the browser is IE,
anything is possible.
'./configure' '--with-mysql=/usr/local/mysql'
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-bcmath' '--with-gd'
'--enable-sockets' '--enable-track-vars' '--with-jpeg-dir=/usr/lib'
'--with-png-dir=/usr/local/lib' '--with-zlib-dir=/usr/lib'
'--with-png'
'--with-ttf'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20674&edit=1