Title: Executing JavaScript allowing users to enter parameters
Last modified: March 29, 2023

---

# Executing JavaScript allowing users to enter parameters

 *  [kjetilk](https://wordpress.org/support/users/kjetilk/)
 * (@kjetilk)
 * [3 years ago](https://wordpress.org/support/topic/executing-javascript-allowing-users-to-enter-parameters/)
 * I suppose I’m rather a noob, but I have the Codemirror block installed. I want
   the code just for an illustration for some users, but I want to make it possible
   for them to enter just a couple of integers, and then execute the code that they
   see with those integers as input parameters, and display a result.
 * I made a CodeMirror block and just for testing, I wrote
 * alert(“foo”)
 * into that block. When I click on the execute button, it says
 *     ```wp-block-code
       It Execute Code on Front End
   
       This button will work only on front end!
       ```
   
 * and then, I don’t understand what Front End means in this context, I tend to 
   think of the browser as the front end… Can I achieve what I set out to do?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [kjetilk](https://wordpress.org/support/users/kjetilk/)
 * (@kjetilk)
 * [3 years ago](https://wordpress.org/support/topic/executing-javascript-allowing-users-to-enter-parameters/#post-16619455)
 * I got a step further. When I previewed, clicking on the execute button printed
 *  alert(“foo”)
 * in the box below, so I suppose that what’s front end mean in this context. Makes
   sense. I haven’t gotten the code to run, though…
 *  Plugin Author [Vicky Agravat](https://wordpress.org/support/users/vickyagravat/)
 * (@vickyagravat)
 * [3 years ago](https://wordpress.org/support/topic/executing-javascript-allowing-users-to-enter-parameters/#post-16625301)
 * Hello [@kjetilk](https://wordpress.org/support/users/kjetilk/),
 * It is experimental feature.
 * So, we can’t provide more support on them…

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Executing JavaScript allowing users to enter parameters’ is closed to
new replies.

 * ![](https://ps.w.org/wp-codemirror-block/assets/icon-256x256.png?rev=2001365)
 * [CodeMirror Blocks](https://wordpress.org/plugins/wp-codemirror-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-codemirror-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-codemirror-block/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-codemirror-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-codemirror-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-codemirror-block/reviews/)

## Tags

 * [execution](https://wordpress.org/support/topic-tag/execution/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 2 replies
 * 2 participants
 * Last reply from: [Vicky Agravat](https://wordpress.org/support/users/vickyagravat/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/executing-javascript-allowing-users-to-enter-parameters/#post-16625301)
 * Status: not resolved