|
Yes. The results from javascript can be put into hidden fields and
passed to the perl script behind the form that contains
javascript.
crude
example:
<head>
<SCRIPT language="JAVASCRIPT"> <!-- function checkForm(){
var location = document.SearchForm.location.value; eval (document.SearchForm.hidden_field.value = location;); document.SearchForm.submit(); return true; } // -->
</SCRIPT>
<title>Test Form</title>
<center>
<form name= "SearchForm" action=""> <input type="text" size="20" maxlength="20"
name="location">
<input type="hidden" name="hidden_field" value=""> <input type="button" value="enter data" > </form> PERL Script: #!c:\perl\bin\perl.exe =pod
=head1 Test script =head2 =over 4 =item 1
Function: Script pulls data from hidden field.
=back
=cut use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); my ($hidden_field); $cgi = new CGI; $hidden_field = $cgi->param('hidden_field'); &do_something($hidden_field);
exit(0);
|
- Javascript and Perl Help!! Michael C. Podlesny
- Re: Javascript and Perl Help!! Norris, Joseph
- Re: Javascript and Perl Help!! Michael C. Podlesny
- RE: Javascript and Perl Help!! Norris, Joseph
