Jump to content

How to pass a POST value to a javascript function


gasma1975

Recommended Posts

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,

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.