712
Views
2
Comments
Pass input parameter to js
Question

Inside a web block with input parameter y, trying to pass 'y' to the javascript of the same web block. How?

2019-05-22 11-30-09
Marcelo Ferreira

Hi,

You just need to have something like this 

SyntaxEditor Code Snippet

"<script>
$( document ).ready(function() {
  alert('Hello " + Input + " World!')
});
</script>"

This if you are using expressions. On RunJavascript Action is the same thing. If you have the JS in the webblock advance property you need to use the expression or the action to call the action there.

Regards,

Marcelo

UserImage.jpg
Ellakkiya

QIUYAN LI wrote:

Inside a web block with input parameter y, trying to pass 'y' to the javascript of the same web block. How?

Hi QIUYAN LI.,

You can also use the bellow function in extended properties

SyntaxEditor Code Snippet

"showbutton('"+Input4.Id+"')"

You can describe the function in javascript editior of the screen

SyntaxEditor Code Snippet

function showbutton(id1){
document.getElementById(id2).style.visiblity="none";
}
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.