Well, we are not able to help you with the javascript. You will have to go over to that forum. As far as the Perl part goes, you will need to learn Perl and also have to look up a tutorial on form processing with Perl. Google is your friend.
Once you have some code and need help troubleshooting it, go ahead and post it here and we will help you.
What I would do is create a form element in the html page that has the javascript, and then you can grab it in perl with the CGI module. If you don't want the user to see it make it a hidden form element.
If you wanted the persons first and last name to pass from javascript to perl
Here is an example:
var fname = document.theFor m.First.value() ;
var lname= document.theFor m.Last.value();
document.theFor m.flname.value= fname+" "+lname;
}
//->
</head>
<body>
<form name=theForm method=get action=perlScri pt>
<input type=hidden name=flname>
Type your first name:
<input type=text name=First>
Type your last name:
<input type=text name=Last>
<input type=submit onclick="javasc ript:doIt();">
</form>
</body>
</html>[/HTML]
Then in perl:
[CODE=perl]use CGI qw/:standard/;
$name = param('flname') ;
print $name;
[/CODE]
this should return (or more correctly display) their first and last name.
The html, and javascript, and perl I wrote is very crude, but hey it's not my project right?
Comment