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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:35:23+00:00 2026-05-12T06:35:23+00:00

I have a form with markup like this…. Which voucher did you cut out

  • 0

I have a form with markup like this….

Which voucher did you cut out

<div class="answer item1">
  <input type="checkbox" name="downloaded_vouchers[answer1]" id="answer1" value="1"/>
   <label for="answer1">Answer 1</label>
</div>
<div class="answer item1">
   <input type="checkbox" name="downloaded_vouchers[answer1]" id="answer1" value="1"/>
   <label for="answer1">Answer 1</label>
</div>

Which voucher did you use

 <div class="answer item1">
  <input type="checkbox" name="used_vouchers[answer1]" id="usedanswer1" value="1"/>
   <label for="answer1">Answer 1</label>
</div>
<div class="answer item1">
   <input type="checkbox" name="used_vouchers[answer1]" id="usedanswer1" value="1"/>
   <label for="answer1">Answer 1</label>
</div>

I need to be able to somehow, on submition of the form check that the voucher cut matches the one that was used, there is some validation server side but I need to do some client side as well and have no idea where to start, I need to use straight javascript no jquery or similar, can anyone help?

  • 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-12T06:35:23+00:00Added an answer on May 12, 2026 at 6:35 am

    something like this….

       <script type="text/javascript">
        function validate( )
        {
            // use document.getElementById to get the form item
            var item = document.getElementById("yourElement");
            if ( somecondition == true )
            {
                alert("good to go");
                // allow the form to post
                return true;
            }
            else
            {
                alert("I don't think so");
                // return false so the form will not post
                return false;
            }
        }
        </script>
    
        <form onsubmit="Validate();" >
        </form>
    

    returning true from the onsubmit method will send the form through, returning false will not

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a form with three sections, markup looks something like this: div.section1 legend fieldset
Let's say I have markup like this: <form action=foo> <input name=bar /> <button type=button>Save</button>
I have some markup like this: <form id=ddlSelections runat=server> <asp:ScriptManager ID=ScriptManager1 runat=server EnablePartialRendering=true />
I have form like this: <form method=POST> <p> Nazwa kategorii: <br /> <input name=NazwaKat
I have a CMS with a form-module, which generates an awful markup, that makes
I have an ASP.NET GridView which has columns that look like this: | Foo
I have a form in my aspx markup. I add to it some fields
I have some markup for a set of fields within a form: <ul> <li>
I have the following mark up of a div that contains a form. The
I have form, where some fields are looks like rows, so I can add/delete

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.