First, your callback must be PHP:
function myjsfunction_callback() {
?>
<script>myjsfunction();</script>
<?php
}
Second, you can add multiple callbacks to one action:
add_action( 'myhelp', 'myjsfunction_callback' );
add_action( 'myhelp', 'mysecondfunction' );
Now, you can call do_action()
without parameter …
do_action( 'myhelp' );
… and both callbacks will be executed.
I reply to your comment: You can use just one callback:
do_action( 'myhelp', 'mysecondfunction', 'myjsfunction_callback' );
You have to use a rather abstract callback then, and accept more parameters:
add_action( 'myhelp', 'multicall', 10, 99 );
function multicall()
{
$functions = func_get_args();
foreach ( $functions as $function )
{
if ( function_exists( $function ) )
$function();
}
}
Now you can pass up to 99 function names, and all of them will be executed for that action.