# Calling a commandline function using the onclick button

**URL:** <https://discuss.rubyonrails.org/t/calling-a-commandline-function-using-the-onclick-button/45863>\
**Category:** rubyonrails-talk\
**Created:** [September 7, 2009, 7:51pm UTC](https://discuss.rubyonrails.org/t/calling-a-commandline-function-using-the-onclick-button/45863 "2009-09-07T19:51:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Harrison](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Matt\_Harrison](https://discuss.rubyonrails.org/u/Matt_Harrison)\
**Post date:** [September 7, 2009, 7:51pm UTC](https://discuss.rubyonrails.org/t/calling-a-commandline-function-using-the-onclick-button/45863/1 "2009-09-07T19:51:49Z")

</div>

I have no idea if calling system() from within an ERb template should work or not, it seems like a pretty wild idea 😃

I would try making a controller action that the form submits to, and have the controller make the system call with the data. I haven't tested that but I would give it a try if possible.

HTH

Matt
