You need to include strophe.muc.js in our html file, and after you set up the Strophe connection, you can call the muc methods with conn.muc.foobarMethod (), where conn is the installed Strophe connection and foobarMethod is the method you want to call.
Instead of trying to build everything yourself (and from your question, I assume that you do not have the appropriate know-how), try the already built js xmpp client, for example Candy , which is also built on Strophe.js.
source share