action files

how to register action in start.php that action file has arbitrary functions and these functions used in onclick attribute like this--> onclick="function()" in views directory files. my action file is writen in javascript.