gasma1975 Posted January 27, 2008 Share Posted January 27, 2008 Hi, On page1.php I have a form with a Total value that I POST to page2.php In page2.php I would like to call a javascript function wich will increase the value of TOTAL and display it in HTML But the javascript function is enclosed in a PHP structure. What I tried is (but its not working) <?php echo "VALUE INCREASED = " . '<script type="text/javascript">javafunction($_POST['TOTAL']) </script>' ; ?> thank you for helping, Quote Link to comment Share on other sites More sharing options...
taith Posted January 27, 2008 Share Posted January 27, 2008 <script> function yourfunction(i){ alert(i); } yourfunction('<?=$_POST[anything]?>'); </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.