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 8602441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:05:11+00:00 2026-06-12T02:05:11+00:00

Im a huge noob when it comes about to jQuery, Im in big need

  • 0

Im a huge noob when it comes about to jQuery, Im in big need of help here.

Since its a simple prototype, each select will have 2 options. If the user select the second option from BOTH select, then trigget the submit, a hidden div will show up and scroll the screen to it.

If the user try to press the submit withouth selecting those 2 options, an error message will pop above the non selected option

Im thinking of something quiet like this on html

<style>
    .surprise {
        display: none;
    }
    .error {
        display: none;
    }
</style>

 <form>
     <select>
         <option>Please Select Your Value</option>
         <option>Pick this value 1</option>
     </select>
     <div class="error">Please select your value</div>

     <select>
         <option>Please Select Your Value</option>
         <option>Pick this value 2</option>
     </select>
     <div class="error">Please select your value</div>

     <input type="submit" value="Show Hidden Div" />         
 </form>

 <div class="suprise">
   Hidden Div
 </div>

Anyone could give me a hand? My main problem is to grab those 2 values then the input will work, or show the error message…

  • 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-12T02:05:12+00:00Added an answer on June 12, 2026 at 2:05 am

    Have not tested:

     //add this id to submit or use your own
    
     $('#submit').click(function(){
    
       $('.error').hide();
       $('.surprise').hide();
    
       var correct = true;
       $('select').each(function(){
         // the option2value is presumed to always be the same as in <option value="option2value" >Text</option
         if($(this).val() != 'option2value'){
           //next is the error... it might be better to use an id there
           $(this).next().show();
           correct = false;
         }
       })
       if(correct){
         $('.surprise').show();
       }
     })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Huge thanks for the help in this thread - Click td, select radio button
am a noob at universal apps so please help me out and let me
Hi (huge Rails newbie here), I have the following models: class Shop < ActiveRecord::Base
I have a huge XML file of 9 GB where i need to add
We are moving our (huge) project to git and we are thinking about using
I am sure this is so easy and I'm just a huge huge noob.
Let me start off by saying I'm a huge Git (and Ubuntu) noob. I
I have a huge spreadsheet of about 300001 rows and 20 columns. The first
I have a huge ASPX web form which has around 100 fields which need
I have a huge table which I need to read through on a certain

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.