How to call UI script in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 06:12 PM
I created a simple ui script, as mentioned below. How can I call this from client script?
function displaytitle()
{
var a= g_form.getValue('number');
var b= g_form.getValue('short_description');
if(a && b)
{
top.document.title= a +'-'+ b;
}
else
{
alert('hello');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 08:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 08:46 PM
Hi Sunny,
Seeing your scripts and all you must call like below. Please define the function in the UI Script on first line as function settile(g_form)
var validateFields = new display_title_on_incident_page(); // You need to pass the title of the UI Script here
validateFields.settile(g_form);
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 09:05 PM
Ok so the first line in UI script would be "function settile(g_form)"?
and where does these 2 lines go
var validateFields = new display_title_on_incident_page(); // You need to pass the title of the UI Script here
validateFields.settile(g_form);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 09:58 PM
Hi Sunny,
Those 2 lines should be written in the client script.
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 01:01 PM
still not working