Question
Areteans
AU
Last activity: 10 May 2016 1:44 EDT
How to pass parameters for function in HTML
Hi Team,
I need a help in passing the parameters for function in HTML.
I have a function [with single parameter] in HTML and i need to call this function while loading the screen.
The value for the parameter will be available from property in my step page.
For that i am using,
String FlowName = tools.getStepPage().getProperty(".FlowKey").toString();
window.attachEvent("onload", doCreateNewCase(FlowName );
But this is not working. I am not getting any exception but the value is not available in function.
Please help me to solve this issue.
Thanks,
Divya Sri Padarthy.
You can use below way to store the string value in js variable,
<script>
var flowname = "<%=tools.getStepPage().getProperty(".FlowKey").toString()%>";
</script>