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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:52:11+00:00 2026-05-20T17:52:11+00:00

I have my .js file in a seperate folder to the index.html Here is

  • 0

I have my .js file in a seperate folder to the index.html

Here is the contents of buildit.js

//On change event for the textbox plate text
      function setValue(target){
        var platetext = target.value;
        $('#numberplateyellow').empty();
        $('#numberplatewhite').empty();


        var plateregex=/^[A-Za-z]{2}[ ]{0,1}[0-9]{2}[ ]{0,1}[a-zA-Z]{3}$/ 
        if (document.platebuilder.target.value.search(plateregex)==-1){
        var answer = confirm ("Non LEGAL Plate Detected (YES WE WILL SHOW THE AGREE BOX ONCE I HAVE IT FROM TOM) \n\n Do you understand that this is now classed as a show plate ?");
        if (answer) {
        $('#numberplateyellow').append(platetext);
        $('#numberplatewhite').append(platetext);
        }
      }
      }

These are called on the onchange in a input box, could you explain why the alert box is not showing and also if you get a chance is it possible to .append after each letter typed ?

Kind Regards

  • 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-20T17:52:12+00:00Added an answer on May 20, 2026 at 5:52 pm

    Because you are passing an into the function you want to reference it without the “document.platebuilder”

    I am not really clear on what you want to see when someone is changing the content of the input field??

    function setValue(target)
    {
        var platetext = target.value;
        $('#numberplateyellow').empty();
        $('#numberplatewhite').empty();
    
        var plateregex=/^[A-Za-z]{2}[ ]{0,1}[0-9]{2}[ ]{0,1}[a-zA-Z]{3}$/
        if (target.value.search(plateregex)==-1)
        {
            var answer = "Non LEGAL Plate Detected (YES WE WILL SHOW THE AGREE BOX ONCE I HAVE IT FROM TOM) \n\n Do you understand that this is now classed as a show plate ?";
            alert(answer);
            $('#numberplateyellow').append(platetext);
            $('#numberplatewhite').append(platetext);
        }
    }
    

    If you want to run this for every key pressed then you need to set this to run on the keypressed event rather than onchange (however this would get quite annoying because of the alert…)

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

Sidebar

Related Questions

i have a log file which contains hundreds/thousands of seperate XML messages and need
If I have a list of data in a text file seperated by a
I have a text file which contains data seperated by '|'. I need to
I have a site with index.php in the root folder, images in /img ,
I have my json file in my raw folder. I have parsed 5 json
Hi all fellow programmer I'd like to have a separate js file for each
I would like a batch file to launch two separate programs then have the
I have file locale/es/LC_MESSAGES/django.mo (and .po), ran makemessages and compilemessages. Definitely all messages are
In the filesystem I have /file.aspx /directory/default.aspx I want to configure IIS so that
If i have file for eg: a log file created by any background process

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.