Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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 Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2014, 03:22 PM
Registered User
Points: 36, Level: 1
Points: 36, Level: 1 Points: 36, Level: 1 Points: 36, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default issue with tabs, jQuery UI

Hi all

I am working with the chapter 6 code.

www.arialboundaries.com/chatting


Parts are working..however, I cannot send a message to a user.

Looking at firebug, the issue seems to be that the add method is deprecated for JQuery UI (I got an errror, no such method add method for tabs widget instance.

I tried to substitute add with append in the javascript (gab.js) but that did not work either...anyone know what I need to substitute to get this to work?

If I have identified the wrong problem, please let me know...thanks!

Michael
  #2 (permalink)  
Old March 13th, 2014, 03:30 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

It looks like in newer jQuery UI you have to add the HTML dynamically and then call tabs("refresh"). They seem to have removed the old behavior completely.

Alternatively you could just use the older version of jQuery UI.
  #3 (permalink)  
Old March 13th, 2014, 04:13 PM
Registered User
Points: 36, Level: 1
Points: 36, Level: 1 Points: 36, Level: 1 Points: 36, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi
I went to a lower version of JQuery UI...it works..I can add a person, and start a chat a session, but...the text does not seem to be sending for some reason:

http://www.arialboundaries.com/chatting

I can type text into the field, but it won't post to chat area...
  #4 (permalink)  
Old March 13th, 2014, 04:26 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

I won't be able to help without some more specific information like the error message in the console, etc.
  #5 (permalink)  
Old March 13th, 2014, 04:36 PM
Registered User
Points: 36, Level: 1
Points: 36, Level: 1 Points: 36, Level: 1 Points: 36, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi
The strange thing is I don't see an error message in the console...

I see a couple, but they refer to deprecated code in the lower version of jquery UI and jquery...

I can get a message through the UI, but can't send one...I really don't see any obvious errors (I am using firebug, Google Chrome, and the built in inspector in Firefox).

Thanks for trying to help
Michael
  #6 (permalink)  
Old March 13th, 2014, 04:39 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

Use the strophe logging stuff (see ch 3,4 I think for examples), and see if the message is getting sent and just getting lost somewhere.
  #7 (permalink)  
Old March 13th, 2014, 05:04 PM
Registered User
Points: 36, Level: 1
Points: 36, Level: 1 Points: 36, Level: 1 Points: 36, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi
I am looking at the error log; I don't see any messages...I can see authentications, when new users are subscribed to, those things are happening...it's almost as if there is no submit action happening...
  #8 (permalink)  
Old March 13th, 2014, 06:19 PM
Registered User
Points: 36, Level: 1
Points: 36, Level: 1 Points: 36, Level: 1 Points: 36, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default Okay, I got it...but not sure how to fix

I now remember that, before I was getting this error in the console:

TypeError: $(...).live is not a function

So I replace instances of live with on, as that seemed to be the way to rewrite this code.

Even going down versions of JQuery, I still get this error message...but maybe the "on" method is not doing something similar to live?

I am still looking, but I think I am on to something...
  #9 (permalink)  
Old March 13th, 2014, 10:22 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 want delegate(): http://api.jquery.com/delegate/
  #10 (permalink)  
Old March 13th, 2014, 10:42 PM
Registered User
Points: 36, Level: 1
Points: 36, Level: 1 Points: 36, Level: 1 Points: 36, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

not to be obtuse, but something like this:

$('.chat-input').delegate('keypress', function (ev) {


It just seems the enter key is not registering...but there could be something larger going on..
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Ch16 (tabs) corrections for later jQuery versions rod.walsh BOOK: Beginning JavaScript and CSS Development with jQuery 0 May 4th, 2012 04:33 AM
IE 7/jquery 1.4.2 checkbox issue PeterPeiGuo BOOK: Beginning JavaScript and CSS Development with jQuery 8 May 16th, 2010 04:05 PM
Menu Tabs jabwedll BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 April 19th, 2010 01:28 PM
Jquery issue FileFound Javascript How-To 0 December 28th, 2009 07:00 AM
Tabs dkr72 C# 1 December 3rd, 2004 02:42 PM



All times are GMT -4. The time now is 10:24 AM.


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