get form value javascript

------=_NextPart_000_0004_01CC1334.4B6E51D0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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!










------=_NextPart_000_0004_01CC1334.4B6E51D0--
italghana [ So, 15 Mai 2011 19:14 ] [ ID #2059536 ]

Re: get form value javascript

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!
>
>
>
>
>
>
>
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Giff Hammar [ Mo, 16 Mai 2011 14:33 ] [ ID #2059561 ]
PHP » gmane.comp.php.database » get form value javascript

Vorheriges Thema: string value in select tag not working as desired with strings
Nächstes Thema: group by