Try these: function redirect($url){ echo "<script>window.navigate('".$url."')</script>"; return; } function open($url){ echo "<script>window.open('".$url."');</script>"; return; } function script($script){ echo "<script>".$script."</script>"; return; } function alert($str){ echo "<script>alert('".$str."');</script>"; return; } Dale Attree NDECS Kwik IT Solutions > I have written my program in such a way that all the html is separate > from my php but now I need to include a piece of javascript within the > php but the php is very unhappy with <script type="text/javascript">, > telling me Parse error: syntax error, unexpected '<' on that line. > How do I do this? > > -- > Regards, > Alf Stockton www.stockton.co.za > > This life is yours. Some of it was given to you; the rest, you made > yourself. > > My email disclaimer is available at www.stockton.co.za/disclaimer.html > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php