Click to See Complete Forum and Search --> : passing variables


mili
07-22-2003, 08:02 PM
I have a table with two cells - price & rate.
When I click on rate, I should pass the input hidden variable from price and when I click on price, I should pass the input hidden variable from rates.How can I do this?
Below is my code.

thanks!

<html>
<head>
<title>Untitled</title>
</head>

<body>
<table>
<tr>
<form name="price" method="post" action="/web/workflow?TableName=price">
<input type="hidden" value="2m">
<td>
<a href="#" onclick="">Price</a>
</td>
</form>
<form name="rate" method="post" action="/web/workflow?TableName=rates">
<input type="hidden" value="0.2">
<td>
<a href="#" onclick="">Rates</a>
</td>
</form>
</tr>

</table>

</body>
</html>

mili
07-22-2003, 10:54 PM
Please could some one tell me if this makes sense?
my code below:
thanks

<html>
<head>
<title>Untitled</title>
<script>
function rate()

{
document.rate.action="/web/workflow?TableName=rates";
document.rate.method="post"

var price=document.price.valueprice.value;

document.rate.submit;

}
function price()

{
document.price.action="/web/workflow?TableName=price";
document.price.method="post"

var rate=document.rate.valuerate.value;

document.price.submit;

}
</script>
</head>
<body>
<table>
<tr>
<form name="price" method="post" action="/web/workflow?TableName=price">
<input type="hidden" value="2m" name="valueprice">
<td>
<a href="#" onclick="price();">Price</a>
</td>
</form>
<form name="rate" method="post" action="/web/workflow?TableName=rates">
<input type="hidden" value="0.2" name="valuerate">
<td>
<a href="#" onclick="rate();">Rates</a>
</td>
</form>
</tr>
</table>
</body>
</html>