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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:15:19+00:00 2026-05-13T14:15:19+00:00

I’ve wrote a html page wich uses jquery, but javascript execution stops at the

  • 0

I’ve wrote a html page wich uses jquery, but javascript execution stops at the following point:

alert($('[name=fAantalVakjes]').val());

This is the relevant html tag:

<input type="hidden" value="1" id="fAantalVakjes" name="fAantalVakjes" />

Could someone help me please?

Thanks in advance,

Yvan
Edit: full code:

function ValidateOnderzoeksRechter() {
    var or1, or2, or3, totaalOR;
    var blnReturn = true;
    or1 = $('#fOnderzoeksrechter_1').attr('value');
    or2 = $('#fOnderzoeksrechter_2').attr('value');
    or3 = $('#fOnderzoeksrechter_3').attr('value');

    if ((or1.length == 2)) {
        // ok
        setColor('fOnderzoeksrechter_1',true);
    } else {
        // NOT OK
        setColor('fOnderzoeksrechter_1',false);
        blnReturn = false;
    }

    if ((or2.length <= 7) && (or2.length >= 1)) {
        // ok
        setColor('fOnderzoeksrechter_2',true);
    } else {
        // NOT OK
        setColor('fOnderzoeksrechter_2',false);
        blnReturn = false;
    }

    if ((or3.length == 2)) {
        // ok
        setColor('fOnderzoeksrechter_3',true);
    } else {
        // NOT OK
        setColor('fOnderzoeksrechter_3',false);
        blnReturn = false;
    }

    $('#fOnderzoeksrechter_1').val((or1.toUpperCase()));
    $('#fOnderzoeksrechter_2').val((or2.toUpperCase()));
    $('#fOnderzoeksrechter_3').val((or3.toUpperCase()));

    if (blnReturn) {
        //$('#message').html('Gelieve de rode vakjes te corrigeren.');
    }

    return blnReturn;
}

function ValidateParketNr() {
    var parket1, parket2, parket3, parket4, parket5, totaalParket;
    parket1 = $('#fParket1').attr('value');
    parket2 = $('#fParket2').attr('value');
    parket3 = $('#fParket3').attr('value');
    parket4 = $('#fParket4').attr('value');
    parket5 = $('#fParket5').attr('value');



    var blnReturn;
    blnReturn = true;
    if ((parket1.length == 2)) {
        // ok
        setColor('fParket1',true);
    } else {
        // NOT OK
        setColor('fParket1',false);
        blnReturn = false;
    }
    if ((parket2.length == 2)) {
        // ok
        setColor('fParket2',true);
    } else {
        // NOT OK
        setColor('fParket2',false);
        blnReturn = false;
    }
    if ((parket3.length == 2)) {
        // ok
        setColor('fParket3',true);
    } else {
        // NOT OK
        setColor('fParket3',false);
        blnReturn = false;
    }
    if (IsNumeric(parket4) && (parket4.length) <= 7 && (parket4.length) >= 1) {
        // ok
        setColor('fParket4',true);
    } else {
        // NOT OK
        setColor('fParket4',false);
        blnReturn = false;
    }
    if (IsNumeric(parket5) && (parket5.length) == 2) {
        // ok
        setColor('fParket5',true);
    } else {
        // NOT OK
        setColor('fParket5',false);
        blnReturn = false;
    }



    $('#fParket1').val((parket1.toUpperCase()));
    $('#fParket2').val((parket2.toUpperCase()));
    $('#fParket3').val((parket3.toUpperCase()));

    if (blnReturn) {
        //$('#message').html('Gelieve de rode vakjes te corrigeren.');
    }

    return blnReturn;
}

function IsNumeric(sText)
{
    if (sText != null) {

       var ValidChars = "0123456789.";
       var IsNumber=true;
       var Char;
       for (i = 0; i < sText.length && IsNumber == true; i++) 
          { 
          Char = sText.charAt(i); 
          if (ValidChars.indexOf(Char) == -1) 
             {
             IsNumber = false;
             }
          }
        return IsNumber;
    } else {
        return false;
    }


}

function setColor(naam ,blnOK) {
    if(blnOK) {
        $('#' + naam).css('background-color', '#00ff00');

    } else {
        $('#' + naam).css('background-color', '#ff0000');
    }
}

function ValidateForm() {

    var blnResult;
    blnResult = true;
    if(!orIsLeeg()) {

        blnResult = ValidateOnderzoeksRechter();
    }
    if (!ParketIsLeeg()) {
        blnResult = ValidateParketNr();
    }


    blnResult = ValideerRestVanFormulier();
    return blnResult;
}

function XOR(b1, b2) {
    return (!b1 && b2) || (b1 && !b2);
}

function orIsLeeg() {
    var ISLEEG;
    ISLEEG = true;
    for (var x = 0; x < 3; x++){
        if ($('#fOnderzoeksrechter_' + (x + 1)).val != '') {
            ISLEEG = false;
        }
    }   
    return ISLEEG;
}

function ParketIsLeeg() {
    var ISLEEG;
    ISLEEG = true;
    for (var x = 0; x < 5; x++){
        if ($('#fParket' + (x + 1)).val != '') {
            ISLEEG = false;
        }
    }   
    return ISLEEG;
}

function ValideerRestVanFormulier() {
    var ret, value;
    ret = true;
    ret = ValideerCijfer('fAantalMaatregelen');
    ret = ValideerCijfer('fAantalOnderzoeken');
    ret = ValideerCijfer('fAantalBetrokkenVerdachten');
    ret = ValideerCijfer('fAantalNuttig');


    for (var x = 0; x < AANTAL_VAKJES ; x++){
        ret = ValideerCijfer('fFeitAantal' + x);
    }

    return ret;
}

function ValideerCijfer(veld) {
    try {
        if (IsNumeric($("#"  + veld).val()) && ($("#"  + veld).val() != '')) {
            setColor(veld, true);
            return true;
        } else {
            setColor(veld, false);
            return false;   
        }
    } catch (ex) {
        alert(ex);
    }
}

The function is called from this element:

<input type="text" onchange="ValideerRestVanFormulier()" value="" name="fFeitAantal0" />

The following code outputs ‘sText undefined’:

function ValideerCijfer(veld) {
    try {
        if (IsNumeric($("#"  + veld).val()) && ($("#"  + veld).val() != '')) {
            setColor(veld, true);
            return true;
        } else {
            setColor(veld, false);
            return false;   
        }
    } catch (ex) {
        alert(ex);
    }
}

See the isNumeric function above…

Here’s a short explanation of the function names (they’re dutch)
ValideerCijfer = validateNumber –> A function used to check if it’s a valid number.

  • 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-13T14:15:19+00:00Added an answer on May 13, 2026 at 2:15 pm

    Found the problem myself: I forgot to specify an ID to the fAantalVakjes field…

    Thanks for the help!

    Yvan

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

Sidebar

Ask A Question

Stats

  • Questions 427k
  • Answers 427k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Clearly the exact implementation will be something more complicated than… May 15, 2026 at 12:51 pm
  • Editorial Team
    Editorial Team added an answer There's no direct equivalent. include and family are similar, but… May 15, 2026 at 12:51 pm
  • Editorial Team
    Editorial Team added an answer Ok this isn't the most elegant solution because it doesn't… May 15, 2026 at 12:51 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.