Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 1st, 2011, 07:10 AM
Registered User
 
Join Date: May 2010
Location: Terra/Sol/Orion-Cygnus Arm/MilkyWay
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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(
"http://localhost:5280/xmpp-httpbind");
//'http://bosh.metajack.im:5280/xmpp-httpbind')

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(
'http://bosh.metajack.im:5280/xmpp-httpbind')

It works now.

I am a newbie, did I get it right or am I missing something?
  #2 (permalink)  
Old March 1st, 2011, 01:45 PM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

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.
  #3 (permalink)  
Old March 5th, 2012, 10:05 AM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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).

Last edited by rod.walsh; March 5th, 2012 at 10:22 AM..
  #4 (permalink)  
Old March 13th, 2012, 12:31 AM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

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.
  #5 (permalink)  
Old March 15th, 2012, 01:47 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

is chp 06 code run fine with you all?

i get error on chp 6

can any one help me

error screen shot

http://4.bp.blogspot.com/-S1KfS0EILK...gQ/s1600/3.png


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the correct code on page 441 - 442? Grace BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 4 July 13th, 2009 06:20 AM
Why does this code work (chp.6)? wrockinator BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 3 December 3rd, 2008 03:16 AM
Correct code stefanocinfo BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 2 October 4th, 2006 03:06 AM
the correct way to clear a form field in js crmpicco Javascript How-To 3 March 21st, 2006 08:44 AM
Is this code correct for a Dataview rayncarnation ASP.NET 1.0 and 1.1 Basics 0 November 7th, 2005 05:55 PM





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