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

  • Home
  • SEARCH
  • 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 8343477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:04:44+00:00 2026-06-09T06:04:44+00:00

I have text boxes and drop downs in my form.and I have a button

  • 0

I have text boxes and drop downs in my form.and I have a button named"search". When I enter the values and click on the search button I have display the search results.

Entering all values is not required, user has to enter at least one value otherwise we have to give validation message that Enter at least one value. How can I do this validation?

I gave like:

var fn = myForm.getItemValue("FirstName");
var ln = myForm.getItemValue("LastName");
var c = myForm.getItemValue("City");
var st = myForm.getItemValue("State");
var cnt = myForm.getItemValue("Country");
var zc = myForm.getItemValue("Zipcode");
var em = myForm.getItemValue("Email");
var ph = myForm.getItemValue("Phone");
if (fn == "" && ln == "" && c == "" && st == "" && zc == "" && em == "" && ph == "" ) {
alert("please enter atleast one value");
}

My alert is working fine, but I want to display validation message in the form that "please enter at least one field" at the top of the form. How can I do this?

  • 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-06-09T06:04:47+00:00Added an answer on June 9, 2026 at 6:04 am

    At the top of the form add a div

    <div id="message"></div>
    

    In your script, in place of the alert:

    $("#message").html("");
    
    • 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 two text boxes, one select drop down and one
I have 6 text boxes on an asp page and one search button. Users
I have an HTML form with radio buttons, check boxes, text fields and drop
I have a form that displays contact email addresses in text boxes, and drop
I have a form which has First Name, Last Name text boxes, Radio button(Yes
how to fill text boxes based on drop down selection i have a table:
I have 2 text boxes and a submit button.On clicking on the submit button
I have a HTML page containing a form which consists of; text, check boxes
i have a HTML form, user should be able to add other text boxes
I have text input boxes. There is validation for each of the boxes using

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.