Click to See Complete Forum and Search --> : Jabber Help


Kerrie Knight
08-12-2003, 01:37 PM
I am currently using web messenger as an IM for my site. I was needing some help customizing the javascript for part of the program. When you add a contact you have to type in "user@jabber.domain.com". I want to be able to have the users type in just the username and have the script add the "@jabber.domain.com". I will attach the file for everyone to see. I know nothing about Javascript.

Much thanks in advance for your help!

Khalid Ali
08-13-2003, 01:19 AM
If I understand you correctly,the answer is fairly simple.
Just append the @jabber.domain.com at the end of the value iint he text field.

var postFix = "@jabber.domain.com";

//now get value from the text field
var val = document.formName.fieldName.value;

var newVal = val+postFix;