Re: get form value javascript
| From: | Giff Hammar | Date: | Mon, 16 May 2011 12:33:46 +0000 |
| Subject: | Re: get form value javascript | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47792@lists.php.net to get a copy of this message | ||
You might want to consider using a session variable to pass values from
page to page, particularly if there are a lot of data to pass.
Giff
On Sun, 2011-05-15 at 19:14 +0200, italghana wrote:
> Please can someone help me.
>
> I have a dynamic table with a form having a link that should be submitted
> via <a href="javascript:allaquint('.$rows['userName'].');">
>
> Contact user </a>.
>
> I want to get the user name passed to another page.
>
> This is my code:
>
>
>
> <script language="javascript">
>
> function app(name){
>
> document.mio.name.value=name;
>
> document.mio.submit();
>
> }
>
> </script>
>
> </head>
>
>
>
> <body>
>
> <table border="0" cellpadding="2" cellspacing="2">
>
> <tr>
>
> <td>Name</td>
>
> </tr>
>
> <?php do { ?>
>
> <tr>
>
> <td><form id="mio" name="mio"
> action="dataPro.php">
>
> <input name="name" type="hidden" value="<?php
> echo
> $row_yab['loginName']; ?>" /><?php echo
> $row_yab['loginName']; ?><a
> href="javascript:app(<?php echo $row_yab['loginName']; ?>);">Send
> Message</a>
>
> </form></td>
>
> </tr>
>
> <?php } while ($row_yab = mysql_fetch_assoc($yab)); ?>
>
> </table>
>
> </body>
>
> </html>
>
> Any help will be appreciated!
>
>
>
>
>
>
>
>
>