Discussion on:

8
Comments

Join the conversation!

Follow via:
RSS
Email Alert
0 Votes
+ -
testing
napo@... 17th Apr 2007
Big
0 Votes
+ -
Good
engg_gurdas@... 19th Apr 2007
Evergreen Article.
In Listing A, where you test for fullname not null and value equal to spaces, should the else cause flag to be set to true rather than false? Same question for contactnumber.
Yes. In addition to these basic syntax errors...

varfullname =
varcontactnumber =

...which should be:

var fullname =
var contactnumber =
0 Votes
+ -
Editor
Thanks for making us aware of the issues with the listings. I contacted the author, and we have updated Listings A and B.

Thanks again,
Mary Weilage
Newsletter Editor
0 Votes
+ -
IE is broken in that it allows indices to use parentheses ().

Changing it to brackets lets this work in standard compliant browsers - so change the <nclick event to this -

<nclick="document.getElementsByTagName('p')[0].innerHTML = document.getElementById('fullNameField').value;"
0 Votes
+ -
Smaller change
Len Harding 18th Apr 2007
I just changed the line that sets the variable to use brackets. So now you have:

var contactnumber = document.getElementsByName("contactNumber")[0];

Code runs fine in Firefox and IE after that.
0 Votes
+ -
I see
Len Harding 18th Apr 2007
Your code change was for example C while I was still on A.
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.