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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 1st, 2011, 06: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?
Reply With Quote
  #2 (permalink)  
Old March 1st, 2011, 12: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 14 Times in 14 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.
Reply With Quote
  #3 (permalink)  
Old March 5th, 2012, 09: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 09:22 AM.
Reply With Quote
  #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 14 Times in 14 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.
Reply With Quote
  #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
Reply With Quote
Reply


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
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 02: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 07:44 AM
Is this code correct for a Dataview rayncarnation ASP.NET 1.0 and 1.1 Basics 0 November 7th, 2005 04:55 PM



All times are GMT -4. The time now is 04:19 AM.


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