Populate an URL link with the returned Array values
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 09:51 AM
Hi All,
How can I populate an URL link with the returned array values?
Returned Values:::
function handleResponse(answer) {
//var answer = response.responseXML.documentElement.getAttribute('answer');
answer = JSON.parse(answer);
//g_form.addInfoMessage("Role Title: " + answer[0]);
// g_form.addInfoMessage("Level: " + answer[1]);
// g_form.addInfoMessage("Cost Center: " + answer[2]);
// g_form.addInfoMessage("Comment: " + answer[3]);
// g_form.addInfoMessage("URL Link: " + answer[4]);
//top.window.open(answer[4] + "/esc?id=sc_cat_item&sys_id=dcfdfdeb1be0a4904efea7d1ec4bcb58&sysparm_roleid=" + id, '_blank');
top.window.open(answer[4] + "/esc?id=sc_cat_item&sys_id=dcfdfdeb1be0a4904efea7d1ec4bcb58&sysparm_roleid&sysparm_roletitle=" + id & answer[0], '_blank');
I need to add all of them within the 'top.window.open' statement.
top.window.open(answer[4] + "/esc?id=sc_cat_item&sys_id=dcfdfdeb1be0a4904efea7d1ec4bcb58&sysparm_roleid&sysparm_roletitle=" + id & answer[0], '_blank');
Thanks and Regards,
Saurabh Chatterjee
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 10:53 AM
@chatsaurav19 The code you pasted should work, are you facing any error while forming the URL via the dynamic values from array?