p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional XMPP Programming with JavaScript and jQuery (http://p2p.wrox.com/forumdisplay.php?f=542)
-   -   Chp 7 : Dig.js - need to correct code (http://p2p.wrox.com/showthread.php?t=82793)

Robert Moses March 1st, 2011 07:10 AM

Chp 7 : Dig.js - need to correct code
Great book, I am enjoying it immensely.

In the dig.js the following code does not work:

$(document).bind('connect', function (ev, data) {
var conn = new Strophe.Connection(

I had to remove "http://localhost:5280/xmpp-httpbind" and make it look like this:

$(document).bind('connect', function (ev, data) {
var conn = new Strophe.Connection(

It works now.

I am a newbie, did I get it right or am I missing something?

metajack March 1st, 2011 01:45 PM

You are correct. This problem also existed in the code for chapters 9 and 10 as well. I've fixed them all up at http://github.com/metajack/profxmpp.

The code appears to be correct in the book thankfully.

rod.walsh March 5th, 2012 10:05 AM

github diff
Same problem, same correction.

it would be helpful to note the diff/corrections at github too (i.e. which of the wrox downloads have been updated).

naturally it would be good to push this upstream to wrox too ;)

BTW, the github code doesn't work either (as of 5.March.2012) - the new connection line is missing a ; (before that line was commented so it's omission was only pain in waiting).

metajack March 13th, 2012 12:31 AM

I fixed missing semicolon. I suspect that JavaScript's semicolon insertion would have fixed this normally, and that's probably why no one ever reported it before?

I'll see what I can do to get wrox to fix the upstream codebase.

i_am_dhaval March 15th, 2012 01:47 AM

is chp 06 code run fine with you all?

i get error on chp 6

can any one help me

error screen shot


All times are GMT -4. The time now is 07:12 PM.

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