List Info

Thread: Re: having a html button/check box call a perl subroutine




Re: having a html button/check box call a perl subroutine
country flaguser name
United States
2007-07-24 21:45:51
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&qu
ot;;
}
-->
</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-Weblistserv.ActiveState.com
>> To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
>>
>
> _______________________________________________
> Perl-Win32-Web mailing list
> Perl-Win32-Weblistserv.ActiveState.com
> To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
>
>

_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Weblistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )