Reply to Re: Button calling multiple functions

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация