Re: php and javascript
| From: | Oscar F | Date: | Tue, 18 Mar 2003 22:56:41 +0000 |
| Subject: | Re: php and javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140217@lists.php.net to get a copy of this message | ||
It has to do with the fact that you're using single quotes, and
$thepage is not replaced for its value.
I think you'd want to rewrite the function like this (note the \ escaping the "):
function js_pointer_login($thepage)
{
echo "<script language=\"javascript\"> window.location = '$thepage'
</script>";
}
Hope this Helps,
Oscar F.
Antoine wrote:
I wrote a function to redirect my page to another one. But for some reason I keep getting an error. here is the function I made function js_pointer_login($thepage) { echo '<script language="javascript"> window.location = '$thepage' </script>'; }