Re: having a html button/check box call a perl subroutine
by Chip Hedler other posts by this author
Jul 24 2007 7:45PM messages near this date
view in the new Beta List Site
Re: having a html button/check box call a perl subroutine
|
HTTP Headers Appearing Since Upgrade
I'm hardly an expert, but I've tested the following:
<html>
<head>
<title> checkbox navigation</title>
<script language="JavaScript" type="text/javascript">
<!--
function clickNav (){
location.href="http://www.rumney.org";
}
-->
</script>
</head>
<body>
check this box:
<input type="checkbox" name="box1" id="box1" value="whatever"
onclick="clickNav()">
</body>
</html>
Of course, a page with a function like this can be generated as part of a
perl script and the URL following location.href can itself be a perl
script with inputs if needed to pass along scalar values used or generated
by the first script. Clumsy? I'm no judge! Are there other, better ways of
getting a checkbox to call a script?
Chip Hedler
> Are you sure you want to run Perl on the client side? Usually it's a
> policy challenge to do that on all the desktops.
>
> If you really know what you are talking about, then you can google
> 'perlscript clientside' to get some good documentation on this.
>
> Dhivya Arasappan/O/VCU wrote:
> >
> > Hi everyone,
> >
> >
> >
> > I'm writing a perl program in which I'm setting up a html checkbox
> > such that when it is clicked, a perl subroutine is called.
> >
> >
> >
> > I know that I can call a javascript function when a checkbox is
> > clicked in the following way:
> >
> > print "<input type='checkbox' name='check' value='checkbox'
> > onClick='javascriptfn();'>";
> >
> > But how can I use the same checkbox to call a perl subroutine?
> >
> > Any kind of guidance would be really appreciated.
> >
> > thanks
> >
> > dhivya arasappan
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Perl-Win32-Web mailing list
> > Perl-Win32-Web@[...].com
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
>
> _______________________________________________
> Perl-Win32-Web mailing list
> Perl-Win32-Web@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
>
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Dhivya Arasappan/O/VCU
Lachlan
Dhivya Arasappan/O/VCU
Dhivya Arasappan/O/VCU
lashley
Bill Luebkert
Foo JH
Chip Hedler
|