Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6154743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:18:46+00:00 2026-05-23T20:18:46+00:00

Am validating a form for empty check. All fields works fine. I have a

  • 0

Am validating a form for empty check.

All fields works fine.

I have a dropdown when i select some value from dropdown some fields will be disabled. onchanging the dropdown value someother fields will be disabled.

Now am struck in validating the fields which are getting disabled and enabled.

if((document.form1.varAuctionTime.disabled = false) && (document.form1.varAuctionTime.value == ""))   

I used above code but it is enabling the fields.

can anybody help me out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:18:46+00:00Added an answer on May 23, 2026 at 8:18 pm

    I upvoted Quentin’s answer.

    document.form1.varAuctionTime.disabled = false uses the assignment operator, which sets the value of disabled to false

    document.form1.varAuctionTime.disabled == false will do a comparison and will return true if the value of disabled is false (or technically, if the value is 0 or an empty string)

    document.form1.varAuctionTime.disabled === false will only return true if the value is false and not if it is 0 or an empty string. This is probably not required as AFAIK the disabled property will always return a boolean.

    To give you a few alternatives that you may prefer; since the comparison operators return booleans, and the disabled property is a boolean anyway, you could just do the following

    if(!document.form1.varAuctionTime.disabled && !document.form1.varAuctionTime.value)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with multiple fields that I'm validating (some with methods added
I have coded custom form validation. validation is working fine all browser but when
Form validation for check boxes only seems to be working in IE....? Anyone have
I have a contact form on my website, and everything works like a charm.
I have a bunch of name/email fields in my form like this: data[Friend][0][name] data[Friend][1][name]
I have that code: jQuery(document).ready(function () { // binds form submission and fields to
I have a contact form that is being submitted, I have PHP validation all
I need to create a user control with form fields for Country (dropdown), Address
I have a form which I am validating on client side for user interaction
I have a MVC application that receives an input from a form. This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.