Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Professional XMPP Programming with JavaScript and jQuery
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional XMPP Programming with JavaScript and jQuery
This is the forum to discuss the Wrox book Professional XMPP Programming with JavaScript and jQuery by Jack Moffitt; ISBN: 978-0-470-54071-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XMPP Programming with JavaScript and jQuery section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 15th, 2014, 05:06 PM
Authorized User
Points: 182, Level: 3
Points: 182, Level: 3 Points: 182, Level: 3 Points: 182, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default Anyone successfully used strophe.register.js?

I'm trying to use the strophe.register.js plugin from github https://github.com/strophe/strophejs...aster/register to do in-band registration. When I load my page, I get the following error
'undefined' is not an object (evaluating 'conn.authenticate.bind')
This error occurs on line 86 of strophe.register.js

Has anyone know about about hacks to fix this or has anyone successfully used this plugin?

Here's the code I have so far

Code:
<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml"> 

<head>

<script type = "text/javascript" src="http://code.jquery.com/jquery-latest.js"> </script>


<!--JQ mobile -->

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.css" />

<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>

<script src="http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.js"></script>




<!--include strophe and associated libraries/plugins-->

<script src='path/strophe.js'></script>
<script src='path/strophe.register.js'></script>
<script src='path/scripts/flXHR.js'></script>



<script>

$(document).ready(function(){


var user = "user;"

var password = "password";



var callback = function (status) {

if (status === Strophe.Status.REGISTER) {

// fill out the fields

connection.register.fields.username = user;

connection.register.fields.password = password;

// calling submit will continue the registration process

connection.register.submit();

} else if (status === Strophe.Status.REGISTERED) {

console.log("registered!");

// calling login will authenticate the registered JID.

//connection.authenticate();

} else if (status === Strophe.Status.CONFLICT) {

console.log("Contact already existed!");

} else if (status === Strophe.Status.NOTACCEPTABLE) {

console.log("Registration form not properly filled out.")

} else if (status === Strophe.Status.REGIFAIL) {

console.log("The Server does not support In-Band Registration")

} else if (status === Strophe.Status.CONNECTED) {

// Say registration was successful

} else {

// Do other stuff

}

};




var connection = new Strophe.Connection("http://bosh.metajack.im:5280/xmpp-httpbind");

connection.register.connect("miqote.com", callback, wait, hold);


});//End document ready

</script>


</head>

<body>

</body>
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Has anyone successfully used Strophe.Status.DISCONNECTING object? drayarms BOOK: Professional XMPP Programming with JavaScript and jQuery 1 July 20th, 2014 01:10 PM
XMPP Strophe JS Best Practice wlazuardi BOOK: Professional XMPP Programming with JavaScript and jQuery 3 December 13th, 2013 02:02 PM
Register XMPP-Account using the Strophe.js-Register-Plugin ede32 BOOK: Professional XMPP Programming with JavaScript and jQuery 3 January 27th, 2013 01:55 PM
Issues with strophe register plugin Milo1999 BOOK: Professional XMPP Programming with JavaScript and jQuery 0 December 2nd, 2012 12:34 PM
Using sha1 passwords in Strophe.js semper BOOK: Professional XMPP Programming with JavaScript and jQuery 1 June 28th, 2010 03:15 PM



All times are GMT -4. The time now is 05:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.