- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2015 07:48 PM
I have wrote a script include for an array outcome. I am calling the same script include through a client script. What I need is to get an alert/pop-up alert to display the result of the same array. How can that be achieved?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2015 04:11 AM
Hi Kunal,
Instead of alerting it in the loop just add it and display it after the loop's finished:
- function _processResponse(response) {
- var userAttributes = response.responseXML.getElementsByTagName("userAttributes"),
- sStringToAdd = "",
- sAnswer = "";
- for (var i=0; i<userAttributes.length; i++){
- sStringToAdd = i<userAttributes.length - 1 ? userAttributes[i].getAttribute("value") + "," : userAttributes[i].getAttribute("value") + "";
- sAnswer += sStringToAdd;
- }
- alert(sAnswer);
- }
Cheers
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2015 04:36 AM
Thank you so much Greg! It worked!!! Appreciate your help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2015 03:51 AM
Can you reproduce this in any demo instance so that I can take a look?