Hi
Pls help me.I want to send same message to multiple friend ids.When I
am sending to single id its working but not for multiple ids.Pls tell
me how to do it.
My code as follows:-
function
sendmailto()
{
var params = {};
params[opensocial.Message.Field.TITLE] =
"Hi";
params[opensocial.Message.Field.TYPE]
=opensocial.Message.Type.PRIVATE_MESSAGE;
var body="test";
var message = opensocial.newMessage(body, params);
var selRef=document.getElementById('person'); //mutiple listbox
content
var recipient=new Array();
for (i=0; i<selRef.options.length; i++)
{
if(selRef.options[i].selected)
{
recipient[i] = selRef.options[i].value; //fetching id of friend
//alert(selRef.options[i].value+
'-'+selRef.options[i].text);
}
}
opensocial.requestSendMessage(recipient,message,onSendNotification);
}
function
onSendNotification(resp)
{
if (!resp.hadError() && resp.getData().status == "sent") {
alert(
"The message was sent to the recipient");
}
else {
alert(
"There was a problem: " + resp.getErrorMessage());
}
};
Looking forward for your reply.
rgds
Chandrika
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---