[thelist] [javaScript] removing values from forms

Volkan Özçelik volkan.ozcelik at gmail.com
Wed Jul 8 08:56:07 CDT 2009


Hi Tris,
passing your code through JSLint [1] will help you (most of the time) spot
out incorrect usages of JavaScript:

JSLint says:

Problem at line 2 character 41: Expected a conditional expression and
instead saw an assignment at:

if (document.addUser.inputName.value *=* inputDisplay) {

which clearly is the logic error behind your code.

<tip author="Volkan Özçelik" type="JavaScript">
JavaScript is not a strongly-type language. It's rather loose, prototypical
and functional.
This will make it harder to spot out js-related errors.

Make sure that you pass your javascript through Jslint (
http://www.jslint.com )

In the end you will spot out some hidden bugs and gain a leaner, structured
code.
</tip>

HTH,
-- 
Volkan Ozcelik
+> Front End Architect, MessengerFX : http://www.messengerfx.com/
+> I tweet: http://twitter.com/linkibol
+> linkibol.com - in seek for quality links : http://www.linkibol.com/
+> my blog (in Turkish) : http://www.fikribol.com/donkisot/
+> Sardalya JavaScript Library : http://www.sarmal.com/sardalya/



More information about the thelist mailing list