why this script is not running on my php files but its running on other computers.

<script type="text/javascript">window.opener.location.reload(); </script>";


thanks in advance.

- tagz017

Are you escaping the quotes ( " ) ?

should be <script type=\"text/javascript\">window.opener.location.reload(); </script> - if you're putting it in a doublequoted sring; which it appears you are, looking at the last 2 characters..

sorry i forgot.. i'm printing this script on a php code. it should be

print "<script type="text/javascript">window.opener.location.reload(); </script>";

i'm not familiar with dll's need your help on this one too. i'm using php version 5.

thnx

Yep. Change the code to:

print "<script type=\"text/javascript\">window.opener.location.reload(); </script>";

or

print "<script type='text/javascript'>window.opener.location.reload(); </script>";

If you don't escape the quotes within a string; the parser will think that the string ends early. i.e, it will get to
"<script type=" and then get confused. In this context, putting a \ character means 'ignore the next character', and using single quotes inside the string rather than double quotes stops the parser thinking that your inner-string quotes are end-of-string quotes..

Thanks MattEvans :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.