Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- JavaScript and PHP help


StupidScript - 9:50 pm on Jun 13, 2008 (gmt 0)


I'm not a big fan of trying to execute a client-side action with a server-side language, so I've broken your script up into server- and client-side sections:

<script type="text/javascript">
function echoAlert(msg){
alert(msg);
}
</script>
<?php
$var = ("File Written to Sybase01\\\insurance$\\\MSBCBS\\\Send Log\\\Sending\\nContents:");
foreach($lines as $i){
$var .=("\\n {$i}");
}
?>
<script type="text/javascript">
echoAlert('<?php echo $var?>');
</script>

This works fine. Your original code did nothing except print out "echo ('File written.." for me.


Thread source:: http://www.webmasterworld.com/javascript/3672298.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com