Posted by David Dorward on 08/23/05 23:30
allanrodkin@hotmail.com wrote:
> I am a newbie. I am programming in Perl and dynamically generating
> html. I want to call two functions on the click of a button, one a
> javascript function and also a Perl function.
Perl almost always runs on the server, JavaScript almost always runs on the
client.
So you would /probably/ do something like:
<form action="myPerlScript.pl" onsubmit="someJavaScriptFunction()">
<div>
<input type="submit">
</div>
</form>
OR
You would have your Perl script output something along the lines of:
<script type="text/javascript">
someJavaScriptFunction();
</script>
.... depending on what data needed to be sent to the Perl script and what
order you wished the JavaScript function and Perl subroutine to run in.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Navigation:
[Reply to this message]
|