|
Posted by The Natural Philosopher on 10/01/63 12:00
trpost@gmail.com wrote:
> This is exactly what I needed, just a way to dynamically submit POST
> data based on a link clicked. Thanks for all for contributing, code
> below is adapted from (The Natural Philosopher) above.
>
>
> a.php:
>
> <script>
> function submitCases (p)
> {
> document.getElementById("p1").value=p;
> document.getElementById('caseSubmit').submit();
> }
> </script>
>
> <form method="post" id="caseSubmit" action="b.php">
> <INPUT type="hidden" name="postvariable1" id="p1" value="">
>
> <span onclick="submitCases('bla, bla, bla');">span</span>
> </form>
>
>
>
> b.php:
> <?php
>
> echo "<PRE>";
> var_dump($_POST);
> echo "</PRE>";
>
> ?>
Bice of you to debug it..DO test it against ALL browsers.
Navigation:
[Reply to this message]
|