User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,283 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,983 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Form Validation Issues

Join Date: Jun 2006
Location: India
Posts: 7,012
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 368
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Form Validation Issues

  #2  
Nov 18th, 2007
> <!*************SHIPPING INFO*********************> Your commenting is off. It should be:
<!--*************SHIPPING INFO*********************-->
> if (cardChoice = false) You are assigning a value of false to cardChoice and then testing it, hence this condition would never be true irrespective of the value of cardChoice before. Maybe if(!cardChoice) is what you wanted to do.

> // STOP HIDING FROM INCOMPATIBLE BROWSERS -->
Not needed. Almost all modern browsers support javascript nowadays. If you still want to play it safe, use a <noscript> tag instead.

You are not using stylesheets which is a bad idea in itself. Separation of presentation, data and logic is crucial for todays' web apps. Also consider linking to an external script file.

Always use a validator to check the validity of the web pages you author. I would save both yours as well as the time of the person helping you out once it is known that the web page is a valid one. Consider keeping a DOCTYPE at the top of your page and validating against it using the online validator.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
All times are GMT -4. The time now is 7:11 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC