- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 02:05 AM
how to get a popup window, where i can enter some text. onchange of some field?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 02:46 AM
Please tell me where you are facing the issue, first you need to create a onChange client script with below code. Then make a UI page with name 'add_comments_dialog' and then add the code given in the link in HTML (section 4.2.1) and client script code (section 4.2.2) in the Client script part of UI page.
http://wiki.servicenow.com/index.php?title=Displaying_a_Custom_Dialog#gsc.tab=0
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
onChange client script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
commentsDialog();
function commentsDialog() {
//Get the values to pass into the dialog
var comments_text = g_form.getValue("comments");
var short_text = g_form.getValue("short_description");
//Initialize and open the dialog
var dialog = new GlideDialogWindow("add_comments_dialog"); //Instantiate the dialog containing the UI Page 'add_comments_dialog'
dialog.setTitle("Add Task Comments"); //Set the dialog title
dialog.setPreference("comments_text", comments_text); //Pass the comments into the dialog
dialog.setPreference("short_text", short_text); //Pass in a short description for use in the dialog
dialog.render(); //Open the dialog
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 02:09 AM
You can make use of glide dialog http://wiki.servicenow.com/index.php?title=Displaying_a_Custom_Dialog#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 02:24 AM
am not able to do this, can you please help me with this? On change of category a pop-up need to be opened with a text field.
can you please help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 02:46 AM
Please tell me where you are facing the issue, first you need to create a onChange client script with below code. Then make a UI page with name 'add_comments_dialog' and then add the code given in the link in HTML (section 4.2.1) and client script code (section 4.2.2) in the Client script part of UI page.
http://wiki.servicenow.com/index.php?title=Displaying_a_Custom_Dialog#gsc.tab=0
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
onChange client script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
commentsDialog();
function commentsDialog() {
//Get the values to pass into the dialog
var comments_text = g_form.getValue("comments");
var short_text = g_form.getValue("short_description");
//Initialize and open the dialog
var dialog = new GlideDialogWindow("add_comments_dialog"); //Instantiate the dialog containing the UI Page 'add_comments_dialog'
dialog.setTitle("Add Task Comments"); //Set the dialog title
dialog.setPreference("comments_text", comments_text); //Pass the comments into the dialog
dialog.setPreference("short_text", short_text); //Pass in a short description for use in the dialog
dialog.render(); //Open the dialog
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 04:33 PM
Hi Deepa,
I have created the GlideDialogwindow on my customer registration page and followed the same but my UI page is not rendering for the users who are not in the system. I have given the read access to public on the UI page table, but the UI page stays on loading in Glide Window so could you please help me on this.