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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:51:51+00:00 2026-06-10T10:51:51+00:00

I have a problem with input checking. I don’t want to send the request

  • 0

I have a problem with input checking. I don’t want to send the request if the input length is less than 3.

My form:

<form method='post' action=''>
    Albūma nosaukums: # # this is the input --><input id='titleeee' type='text' name'album_title' /><br />

    Bilde Nr 1: <input type='file' name='pic_nr1' /><br />
    Bilde Nr 2: <input type='file' name='pic_nr2' /><br />
    Bilde Nr 3: <input type='file' name='pic_nr2' /><br />

    Aktīvs*: 
    <select>
        <option>Jā</option>
        <option>Nē</option>
    </select>

    <br />

    <input Onclick='testlenght(document.getElementById("titleeee"), "Tavs albūma nosaukums ir pa īsu!", "3")' type='submit' value='Pievienot' />
</form>
  • 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-10T10:51:52+00:00Added an answer on June 10, 2026 at 10:51 am

    You can add a form onsubmit handler, something like:

    <form onsubmit="return validate();">
    
    </form>
    
    
    <script>function validate() {
     // check if input is bigger than 3
     var value = document.getElementById('titleeee').value;
     if (value.length < 3) {
       return false; // keep form from submitting
     }
    
     // else form is good let it submit, of course you will 
     // probably want to alert the user WHAT went wrong.
    
     return true;
    }</script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an input element and I want to keep checking the length of
I have some problem. Dialog.dismiss() does not work. I want to input ip, username,
I have a little problem with checking my input. I know that there a
I have problem with repopulating form_upload after validation. Other input fields or selectboxes are
I have a problem where I need to split an input string into possible
I have a problem with populating an autocomplete list based on a previous input.
I have little problem in regular expressin creation. Expected input: blahblahblah, blahblahblah, 'blahblahblah', blahblahblah,
I have a strange problem where an onclick event on an input image is
I have a slight problem, I am trying to capture the input of two
i have the following problem with that code in my html tag: <div id=searchbar><input

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.