Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript 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
 
Old August 15th, 2012, 06:24 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Location: San Rafael, CA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 12 pg539 - issue w/ focus( )

Forum,

RE: Referencing page 539.

I'm having difficulty seeing the focus( ) method return the cursor to the txt.UserName form element when the associated conditional test fails. I'm viewing the output in a current version of Firefox 14.0.1.

Is there an error in the code?

Thanks!
Spledge

Last edited by Spledge; August 16th, 2012 at 07:45 PM..
 
Old August 22nd, 2012, 05:37 PM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2012
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Did you check the download code or just go by the book text? There are often differences between the code in the download and the code in the text. I just spent all afternoon on trying to duplicate the code for Ch10_eg19. I literally retyped all the code in my XHTML and CSS docs three times trying to correct paragraph break until I changed the doctype to transitionalt. That miniscule change made all the difference.
 
Old September 1st, 2012, 07:56 PM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2012
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts
Default

There is an error in the code. If you compare the code at the bottom of the page
Code:
(password1.value != password2.value)
to the download code and the code for this section as written on page 540 you'll find that the DL code and page 540 use
Code:
(password1 != password2)
.

You'll find that the first approach simply doesn't work, probably because it doesn't use valid variable names, but the second does.

BTW, have you noticed that the download code for ch12_eg02 doesn't work as far as comparing the passwords? In other words, you can enter any letters you want in "password" and "confirm password" and it will submit as long as they're longer than six characters.
The Following User Says Thank You to RManFlint For This Useful Post:
WaterDog (September 2nd, 2012)




Similar Threads
Thread Thread Starter Forum Replies Last Post
CH 12 LoadTimeSheet() Problem chuck BOOK: Beginning VB.NET Databases 11 July 26th, 2012 11:48 AM
Ch 12 - Animations 2 johnoeffinger BOOK: Beginning iOS 4 Application Development 0 January 27th, 2011 05:44 PM
ch 12 php logins ejurasin BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 13th, 2006 02:24 PM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM





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