Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers by Nicholas C. Zakas; ISBN: 9780764579080
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 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 Search this Thread Display Modes
  #1 (permalink)  
Old July 27th, 2007, 04:37 PM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap8, Browswer Detection,detect.js, Problem!Help

Hi,
    I hope this query is relevant since its the problem from NZ's Book.

    I am trying to run the example code. Chap 8.
    I am using LINUX,(UBUNTU) and FF 2.0.0.5.

    I am not getting the login screen.
    I am getting the 'divError' screen.

what should I add in this ? Where am I wrong?
Thank you,
Prasad.

Reply With Quote
  #2 (permalink)  
Old July 27th, 2007, 05:28 PM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I played for some time...and got the following code to work on Linux Box.

// the following Line in detect.js
var isLinux = (sUserAgent.indexOf("Linux") > -1) && !isWin && !isMac;

// Modifying the following Line in Login.htm

if ((isMinIE5_5 && isWin) || (isMinMoz1 && isUnix)

to

if ((isMinIE5_5 && isWin) || (isMinMoz1 && (isUnix || isLinux) )

This served my purpose and it hopefully is generic for all Linux boxes irrespective of whether they are 686, 586, 486 or 86_64...etc.

thanks.
Prasad.

Reply With Quote
  #3 (permalink)  
Old July 27th, 2007, 05:40 PM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To make login work on Konqueror on a Linux BOX,
modify the following line:

if ((isMinIE5_5 && isWin) || (isMinMoz1 && (isUnix || isLinux) )

to

if ((isMinIE5_5 && isWin) || ((isMinMoz1||isKHTML) && (isUnix || isLinux) )

thanks.
for the book.
prasad.

Reply With Quote
  #4 (permalink)  
Old July 30th, 2007, 12:24 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Hi,

I can't be sure why it's not working for you. If you can post the user agent string that your browser is reporting, I can take a look. Right now, isUnix is keyed off of the "X11" string in the user agent. If that's not there, it wouldn't work.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
Reply With Quote
Reply


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
Zxml.js and input radio problem tezro BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 December 8th, 2007 05:19 PM
Problem about replacement of already loaded js helpless_freshman Javascript 7 August 31st, 2007 08:14 PM
No Login/Is it a Bug in detect.js burrashiva BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 0 July 27th, 2007 03:57 PM
TAPI 3.0 : Problem in Digit Detection Qaisar Visual C++ 0 March 10th, 2006 09:54 PM
Problem in printing Document in JS... sweetee JSP Basics 0 May 22nd, 2004 01:10 AM



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


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