PDA

View Full Version : PArsing Emails


longk6
January 31st, 2007, 08:42 PM
Kathryn,

I've read previous posts and I'm having trouble parsing the email addresses so that they are comma separated. Would it be possible for you to please document exatly what code and where it needs to be so that the emails the widget grabs are parsed and stored in a commas separated string.

I really like the widget and want to use it but the current return format is not useful for our site.

If it helps my textarea it needs to point to is remail.

I could really use your help as I am new to the whole programming things and would really liek to sue the widget. Thanks!

Kevin

longk6
January 31st, 2007, 09:47 PM
Kathryn,

I had given up to early. I went back and figured out what I was doing wrong and I have it working!!!! However, it might be something Plaxo wants to integrate into the widget so that users can make happen easily if they don't have programming skills.

Thanks!

Kevin

kas
February 1st, 2007, 02:43 PM
Hi Kevin -

Thanks for the feedback and I'm glad to hear you have the widget running.

For others, there is JS parsing code in this thread courtesy of m3avrck:
http://forum.plaxo.com/showthread.php?t=3035


and brief sample on using onABCommComplete to parse the name, email data, to the format you want...


function onABCommComplete(data) {
// called when user completes the widget; data is [[name1, email1], [name2, email2], ...]

if (data) {
var nameAndEmail = data[0];

if (nameAndEmail.length > 0) {
setValue('txtNameRecip', nameAndEmail[0]);
setValue('txtEmailRecip', nameAndEmail[1]);
} else alert('no namesAndEmails[0]');
} else alert('no data');
}

//--></script>


Kathy