how to access jvar in UI page client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:59 AM
Hi,
I have one value set on jvar on UI Page HTMl and I want to show one alert message depending on the value set on submit of the UI page.
For that reason I want to check jvar value on onSubmit function of the UI page client script. I am not aware of the syntax on how to do that
HTML-
<g:evaluate expression="RP.getParameterValue('sysparm_flag')" var="jvar_flag"/>
Client Script-
function onSubmit() {
if (jvar_flag===<something>) // not sure of the syntax
{
alert("something");
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2018 01:29 AM
Hi,
I hope the problem is solved but nobody posted the correct answer.
I had a similar problem. Try changing the html "id" and "name",
Then try calling using html "name", worked for me.
<input type=hidden> name="my_sys_id_n" id="my_sys_id" value="${anything}"
Then try
var sys_id= gel("my_sys_id_n").value;
in the client script.
Regards
Rajat