>Any ideas on how to send the correct hidden values to the right perl
script?
>If they're all lumped into one form it won't work. What would you do with
>the hidden variables in this case? I'd prefer to send them as a POST, not a
>GET, too.
First I would add the method="POST" to the form tag, then since the hidden
values are already known, send them from the post in the javascript as
below.
1. add a hidden field to the form
input type="hidden" name="uid" value="0"
2. add document.myform.uid.value = num to the script since the value passed
is what is used by your perl scripts. (do it before submission.)
Modified example:
<html>
<head>
<title>My Test</title>
<script language="JavaScript">
<!--
function gowhere(num)
{
document.myform.uid.value = num
if (num == 1){
document.myform.submit("a.pl")}
if (num == 2){
document.myform.submit("b.pl")}
if (num == 3){
document.myform.submit("c.pl")}
}
//-->
</script>
</head>
<body>
<form method="POST" name="myform">
<input type="hidden" name="uid" value="0">
<input src="button.jpg" name="I1" width="77" height="24" border="0"
type="image" onclick="gowhere(1)"><br>
<input src="button.jpg" name="I2" width="77" height="24" border="0"
type="image" onclick="gowhere(2)"><br>
<input src="button.jpg" name="I3" width="77" height="24" border="0"
type="image" onclick="gowhere(3)">
</form>
</body>
</html>
Rythmist
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------