- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2021 07:17 AM
Hi All,
I want to show a error message in the same dialog window based on condition in clident script UI Page like below
if(condition=='true')
{
<show error message>
}
could you please let me know how to achieve this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2021 08:29 AM
You can try something like this way.
Define below line in html
<span style='color: red;' id="error_msg" class="outputmsg_text"></span>
UI Page client side code
if(condition=='true'){
$j('#error_msg').html(getMessage('Could not request without name'));
gel('error_msg').show();
return false;
}
Quick Demo
Reference:
https://www.geeksforgeeks.org/how-to-display-error-without-alert-box-using-javascript/
If my answer helped you, kindly mark it as correct and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2021 08:29 AM
You can try something like this way.
Define below line in html
<span style='color: red;' id="error_msg" class="outputmsg_text"></span>
UI Page client side code
if(condition=='true'){
$j('#error_msg').html(getMessage('Could not request without name'));
gel('error_msg').show();
return false;
}
Quick Demo
Reference:
https://www.geeksforgeeks.org/how-to-display-error-without-alert-box-using-javascript/
If my answer helped you, kindly mark it as correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2021 08:44 AM
Hi Harshavardhan,
Thanks a lot for the reply
I gave the condition like below
if(condition=='true')
{
$j('#error_msg').html(getMessage('Please Enter Scheduled Job Name'));
gel('error_msg').show();
return false;
}
else{
$j('#error_msg').html(getMessage('test));
gel('error_msg').show();
return false;
}
the else loop is not executing...only its showing the first one..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2021 08:45 AM
missing colon in test .
try
$j('#error_msg').html(getMessage('test'));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2021 08:57 AM
Thank you very much